**Problem:-**C++ Program For Arithmetic Operations Using Switch Case or Write A C++ To Perform All Arithmetic Operations Using Switch Case or C++ Program to Make a Simple Calculator Using Switch Case Statement or c++ program to perform arithmetic operations using functions or simple calculator program in c++ or calculator program in c++ using class or c++ program for arithmetic operations using class or scientific calculator program in c++ using switch case or c++ program to perform arithmetic operations using objects and classes or calculator program in c++ using functions or simple calculator program in c++ or c program to perform arithmetic operations using functions

**Check This:-**Hacker rank solution for Strings, Classes, STL, Inheritance in C++.

**Logic:-**First we are printing the message on screen with 4 options then we are asking for choosing any one of option and after that take two Number form user and pass both number in Switch Case, first write all the cases(for Addition, Subtraction, Multiplication, Division and Mode) then write a code according to statement and execute the operation according to user choice. If you want to see more like this one see C Program To Find The Day Using Switch Case.

**Also Check:-**Geeksforgeeks solution for School, Basic, Easy, Medium, Hard in C++.

**Extreme Recommended:-**Like our Facebook Page or Join our Facebook Group and Google plus Community for up-to-date for a new post or if you have any Query you can ask there with lots of coders also suggest to your Friends to join and like our page, so we can help our community, and don't forget to Subscribe. Enter your Email and click to subscribe.

**Solution:-**

#include<iostream>

using namespace std;

int main()

{

//By-Ghanendra Yadav

float a,b,rem;

int ch,q;

cout<<"Arithmetic Operatios";

cout<<"\n1.Addition\n2.Subtraction\n3.Multiplication\n4.Division\n5.Mode";

cout<<"\n\nEnter Your Choice:\n";

cin>>ch;

switch(ch)

{

case 1:

{

cout<<"\nEnter Two Value Ie:- Value Of A And B ";

cin>>a>>b;

rem=a+b;

cout<<"\n Result = "<<rem;

cout<<"\n";

}

break;

case 2:

{

cout<<"\nEnter Two Value Ie:- Value Of A And B";

cin>>a>>b;

rem=a-b;

cout<<"\n Result = "<<rem;

cout<<"\n";

}

break;

case 3:

{

cout<<"\nEnter Two Value Ie:- Value Of A And B";

cin>>a>>b;

rem=a*b;

cout<<"\n Result = "<<rem;

cout<<"\n";

}

break;

case 4:

{

cout<<"\nEnter Two Value Ie:- Value Of A And B";

cin>>a>>b;

if(a>=b)

{

rem=a/b;

cout<<"\n Result = "<<rem;

cout<<"\n";

}

else

cout<<"\nt 1st Varable Should Be Greater Than 2nd. !!!";

cout<<"\n";

}

break;

case 5:

{

cout<<"\nEnter Two Value Ie:- Value Of A And B";

cin>>a>>b;

if(a>=b)

{

q=a/b;

rem=a-(b*q);

cout<<"\n Result = "<<rem;

cout<<"\n";

}

else

cout<<"\nt 1st Varable Should Be Greater Than 2nd. !!!";

cout<<"\n";

}

break;

}

return 0;

}

**Output:-**

You May Also Like

You May Also Like

1. C++ Program To Perform All Arithnatic Operations Ie:-(a+b,a-b,a*b,a/b,a%b) Using Switch Case

2. C++ To Program Calculate Area Of Circle Rectangle And Triangle Using Switch Case

3. C++ Program For Finding A Grade Using Switch Case

4. C++ Program To Find The Union And Intersection Of Two Sorted Array In Increasing Order.

5. C++ Program To Find Duplicate Element In Array Time Complexity O(n), Space Complexity O(1)

6. C++ Program To Compare Two String

7. C++ Program To Copy One String To Another

8. C++ Program To Display Sring From Backward

9. C++ Program To Average Of Array In Function Of Using Pointer

10. C++ Program For Swapping Two Number In Function Using Pointer

## 0 Comments: