how to write a program to enter two numbers and display first two numbers and previous two numbers
Answers
Answered by
1
/*C program to find difference of two numbers.*/
#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;
Goldensister:
Excellent
Similar questions
Chemistry,
6 months ago
Political Science,
6 months ago
Math,
1 year ago
History,
1 year ago
Chemistry,
1 year ago