Write a C program to perform arithmetic calculation between two numbers.
#include<stdio.h> //Start the program
#include<conio.h>
int main()
{
printf("\n\t\tSIMPLE CALCULATION PROGRAM\n\n\n"); //Display the heading part.
int a=10, b= 20; // Declaring the variables assigning the values.
printf("\n\n\tSUM of two numbers are :\t%d",a+b); //Addition
printf("\n\n\tDIFFERENCE of two numbers are :\t%d",b-a); //Subtraction
printf("\n\n\tPRODUCT of two numbers are :\t%d",a*b); //Product
printf("\n\n\tDIVISION of two numbers are :\t%d",b/a); //Division
printf("\n\n\tMODULUS of two numbers are :\t%d",a%b); //Modulus
getch();
} // End of the program.
OUTPUT :
Write a C program to perform arithmetic calculation between two numbers while assigning the values on runtime.
0 Comments
If you have any doubts , Please let me know.