Main Gestures Programming Music Whoizzy? Links

C Programming

NUMBER CRUNCH V1
EXERCISE 1

#include <stdio.h>

int main(void)
{
   int x, y;

   printf("Enter 1st number: ");
   scanf("%d", &x);

   printf("Enter 2nd number: ");
   scanf("%d", &y);

   printf("\n%d + %d = %d", x, y, x + y);
   printf("\n%d - %d = %d", x, y, x - y);
   printf("\n%d * %d = %d", x, y, x * y);
   printf("\n%d / %d = %d", x, y, x / y);

   printf("\n\nOne more time! \n\n");

   printf("Enter 1st number: ");
   scanf("%d", &x);

   printf("Enter 2nd number: ");
   scanf("%d", &y);

   printf("\n%d + %d = %d", x, y, x + y);
   printf("\n%d - %d = %d", x, y, x - y);
   printf("\n%d * %d = %d", x, y, x * y);
   printf("\n%d / %d = %d", x, y, x / y);

   return 0;
}

GO BACK

Found a broken link?
Mail Me