Computer Science, asked by sri156, 1 year ago

how to make a calculator in c++

Answers

Answered by shashankpandey2001
1
#include<iostream.h>
void main()
{
float a,b,ch;
cout<<"enter 2 nos.";
cin>>a>>b;
cout<<"1. for addition";
cout<<"2 for subtraction";
cout<<"3 for multiplication";
cout<<"4 for division";
switch(ch)
{
case 1: cout<<a+b;
case 2: cout<<a-b;
case 3: cout<<a*b;
case 4: cout<<a/b;
default:cout<<"no such option";
}
}


sri156: r u a teacher ?
sri156: thank u this programme is working.
Answered by Dilipkumardubey
0

hey mate here's your answer my sister

Attachments:
Similar questions