Wednesday 11 March 2015

Program3: Basic I/O and Data Types

Program3:

#include<stdio.h>
#include<conio.h>
void main( )
{
int a,b;
printf("Enter a and b Values: ");
scanf("%d%d",&a,&b);
printf("Addition of a and b is %d\n",a+b);
printf("Substraction of a and b is %d\n",a-b);
printf("Multiplication of a and b is %d\n",a*b);
printf("Division of a and b is %d\n",a/b);
printf("Modulus of a and b is %d\n",a%b);
}


Output:


0 comments:

Post a Comment