int Data Types and scanf Statement in C
Get Certified in C Programming and Take Your Skills to the Next Level
Program 1
#include<stdio.h>
#include<conio.h>
int main()
{
int a=10,b=5,c;
printf("Enter two number");
scanf("%d%d",&a,&b);
//scanf("%d",&a);
// scanf("%d",&b);
c=a+b;
printf("\nAddition of %d and %d is %d",a,b,c);
c=a-b;
printf("\nSub of %d and %d is %d",a,b,c);
c=a*b;
printf("\nMultiplication of %d and %d is %d",a,b,c);
c=a/b;
printf("\nDivision of %d and %d is %d",a,b,c);
return 0;
}
Program 2
#include<stdio.h>
#include<conio.h>
int main()
{
int a,b;
printf("Enter two Number");
scanf("%d%d",&a,&b);
printf(" Before swaping %d %d ",a,b);
a=a+b;
b=a-b;
a=a-b;
printf("\n After swaping %d %d ",a,b);
return 0;
}
Your 15 seconds will encourage us to work even harder
Please share your happy experience on Google

