//EXP10

#include <main.h>

void main(){
   unsigned int count = 0;		//local count variable
   while(TRUE){				//run indefinitely
      if(input(but0)){count++;}		//increment count var
      if(input(but1)){count--;}		//decrement count var
      if(count > 255){count = 0;}	//set count limit to 255
      delay_ms(10); 			//100ms delay between counting up/down
      output_d(count);			//display chars on 7 seg
   }
}