Computer Science, asked by sreetamabarman40, 10 months ago


Write a program to find the difference between two numbers.ans should be in programming language.​

Answers

Answered by Anonymous
9

Answer:

answers is below

Explanation:

/*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;

}

Answered by 217him217
5

Explanation:

#include<stdio.h>

void main()

{

int a, b, c;

printf("enter a & b:");

scanf(%d%d, &a, &b);

c = a-b;

printf("c:%d", c);

}

Similar questions