Computer Science, asked by rutuja29vaidya, 9 months ago

Ashna is a third grade school going school.Miss Benzy is a very strict teacher and she teaches math to all the students. On the first day of academic year, Miss Benzy gave her a homework to find sum, difference, product, quotient and remainder of the two numbers given by her. Can you help Ashna by writing a program for the same.
The input should consist of two integers.

Case 1
Case 2
Case 3
Input (stdin)
3
2

Output (stdout)
a+b=5
a-b=1
a*b=6
a/b=1
a%b=1

Answers

Answered by chandrasayan05subhra
2

Answer:

Explanation:

#include<stdio.h>

int main()

{

int a,b,addition,product,subtraction,quotient,remainder;

   printf("Enter 2 Numbers:");

   scanf("%d %d",&a,&b);

   addition=a+b;

   product=a*b;

   subtraction=a-b;

   quotient=a/b;

   remainder=a%b;

printf("%d\n",addition);

printf("%d\n",product);

printf("%d\n",subtraction);

printf("%d\n",quotient);

printf("%d\n",remainder);

return 0;

}

PLEASE MARK ME BRAINLIEST !!!!!

Answered by mohitkunder
6

Answer:

Explanation:

#include<iostream>

int main()  

{

int a;

int b;

std::cin>>a;

std::cin>>b;

std::cout<<"\na+b="<<(a+b);

std::cout<<"\na-b="<<(a-b);

std::cout<<"\na*b="<<(a*b);

std::cout<<"\na/b="<<(a/b);

std::cout<<"\na%b="<<(a%b);

return 0;

}

Similar questions