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 Sanchi Kohati 4 months, 2 weeks ago
- 0 answers
Posted by Payal Kumari 8 months, 2 weeks ago
- 0 answers
Posted by Sameeha _ 3 months, 4 weeks ago
- 0 answers
Posted by Catherine Tympuiñ 4 months, 1 week ago
- 0 answers
Posted by Manasvi Bhutada 5 months ago
- 1 answers
Posted by Catherine Tympuiñ 4 months, 1 week ago
- 1 answers
Posted by S A 4 months, 3 weeks ago
- 0 answers
Posted by Jaysundar Vc 5 months, 1 week ago
- 0 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 7 years, 11 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