write a c++ program that invokes …
CBSE, JEE, NEET, CUET
Question Bank, Mock Tests, Exam Papers
NCERT Solutions, Sample Papers, Notes, Videos
Related Questions
Posted by Vanshika Prajapati 1 year, 7 months ago
- 1 answers
Posted by M.Sameeha _ 1 year, 2 months ago
- 0 answers
Posted by Jeevesh Jeevesh 1 year, 3 months ago
- 1 answers
Posted by Catherine Tympuiñ 1 year, 2 months ago
- 0 answers
Posted by Payal Kumari 1 year, 6 months ago
- 0 answers
Posted by Manasvi Bhutada 1 year, 3 months ago
- 1 answers
Posted by Catherine Tympuiñ 1 year, 2 months ago
- 1 answers
Posted by Rupesh Rupesh 1 year, 7 months ago
- 2 answers
myCBSEguide
Trusted by 1 Crore+ Students
Test Generator
Create papers online. It's FREE.
CUET Mock Tests
75,000+ questions to practice only on myCBSEguide app
Bindu Agarwal 8 years, 9 months ago
#include <iostream>
using namespace std;
void calc(int a, int b, char c){
float r;
if(c=='+'){
r=a+b;
}
else if(c=='-'){
r=a-b;
}
else if(c=='*'){
r=a*b;
}
else{
r=a/b;
}
cout<<r<<endl;
}
int main(){
int a,b;
cin>>a>>b;
char c;
cin>>c;
calc(a,b,c);
return 0;
}
3Thank You