Write a C program to perform addition, subtraction, multiplication and division of two integer numbers, respectively 2 and 6 and show the result on the screen.
#include<stdio.h>
int main(){
int a=2,b=6;
// Division
printf("%d\n",b/a);
// Multication
printf("%d\n",b*a);
// Addition
printf("%d\n",b+a);
// Subtraction
printf("%d\n",b-a);
return 0;
}
Comments
Leave a comment