write a c program to accept 2 numbers and find thier sum difference and product
Answers
Answered by
4
#include <stdio.h>
int main()
{
int a,b;
int diff;
printf("Enter first number: ");
scanf("%d",&a);
printf("Enter second number: ");
scanf("%d",&b);
// check condition to identify which is largest number
if( a>b )
diff=a-b;
else
diff=b-a;
printf("\nDifference between %d and %d is = %d",a,b,diff);
return 0;
}
abhinav32aj:
is this correct
Similar questions