Answer to Question #274811 in C for Amu Raj

Question #274811

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.

1
Expert's answer
2021-12-06T05:27:06-0500
#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;

}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS