#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
float op1,op2,answer;
char op;
cout<<"Entre the first numper";
cin>>op1;
cout<<"/nEnter the operation";
cin>>op;
cout<<"/nEntre the second numper";
cin>>op2;
if(op=='+')
answer=op1+op2;
if(op=='-')
answer=op1-op2;
if(op=='*')
answer=op1*op2;
if(op=='/')
answer=op1/op2;
else
cout<<op1<<op<<op2<<" = "<<answer;
system("PAUSE");
}
mohamed.abdelsalam.96558061
0
Newbie Poster
Recommended Answers
Jump to PostYes? And your question is?
All 3 Replies
ddanbe
2,724
Professional Procrastinator
Featured Poster
meenal9
0
Newbie Poster
ookhan
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.