[prev] 33 [next]

Exercise 4: Find the average

Modify the program so that it behaves as follows:

int x;  int y;

void main(void) {
   printf("First number: ");
   scanf("%d", &x);
   printf("Second number: ");
   scanf("%d", &y);
   printf("%d\n", (x+y)/2);
}