j

Tuesday, 3 November 2015

Write a program that take 2 number from user and find its sum, product,diffrence,quotient and remeinder and display all

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,sum,prod,dif,qou,rem;
printf("Enter Two numbers:");
scanf("%d%d",&a,&b);
sum=a+b;
prod=a*b;
dif=a-b;
qou=a/b;
rem=a%b;
printf("Sum of two values is %d\n",sum);
printf("Product of two valuse is %d\n",prod);
printf("Diffrence of two values is %d\n",dif);
printf("Qoutient of two valuse is %d\n",qou);
printf("Reminder of two values is %d\n",rem);
getch();
}

Subscribe to this Blog via Email :