Int main { int a,b,sum,product,diff,quotient,remainder


Download 14.67 Kb.
Sana10.12.2020
Hajmi14.67 Kb.
#163796
Bog'liq
Ans1


: #include

int main() {

int a,b,sum,product,diff,quotient,remainder;

printf("Enter 1st number : ");

scanf("%d",&a);

printf("Enter 2nd number : ");

scanf("%d",&b);

sum=a+b;

product=a*b;

diff=a-b;

quotient=a/b;

remainder=a%b;

printf("Sum is : %d",sum);

printf("\nProduct is : %d",product);

printf("\nDifference is : %d",diff);

printf("\nQuotient is : %d",quotient);

printf("\nRemainder is : %d",remainder);

return 0;

}

Output :


Enter 1st number : 200

Enter 2nd number : 50

Sum is : 250

Product is : 10000

Difference is : 150

Quotient is : 4



Remainder is : 0
Download 14.67 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling