#include <stdio.h>
#include <stdlib.h>
void main()
{ int a,b;
printf("\n enter two values: ");
scanf("%d %d",&a,&b);
printf("\n a + b = %d", a+b);
printf("\n a - b = %d", a-b);
printf("\n a * b = %d", a*b);
printf("\n a / b = %d", a/b);
printf("\n a modulus b = %d", a%b);
getch();
}
output:
enter two values: 56
64
a + b = 120
a - b = -8
a * b = 3584
a / b = 0
a modulus b = 56
#include <stdlib.h>
void main()
{ int a,b;
printf("\n enter two values: ");
scanf("%d %d",&a,&b);
printf("\n a + b = %d", a+b);
printf("\n a - b = %d", a-b);
printf("\n a * b = %d", a*b);
printf("\n a / b = %d", a/b);
printf("\n a modulus b = %d", a%b);
getch();
}
output:
enter two values: 56
64
a + b = 120
a - b = -8
a * b = 3584
a / b = 0
a modulus b = 56
No comments:
Post a Comment