Computer Science, asked by VasanthStrangewayer, 1 year ago

Write a program to input a simple mathematical expression consisting of binary operator and two integer operands and evaluate it. For example, if
INPUT: 55+11
OUTPUT: 66
INPUT: 5*12
OUTPUT: 60

Answers

Answered by NiharMadhavi
0
#include<iostream.h>
#include<conio.h>
void main ()
{
clrscr();
int a,b,sum,substraction,multi, division;
cout<<"enter the first number"<<a;
cout<<"enter second number"<<b;
sum=a+b;
cout<<"sum of two numbers is:"<<sum;
substraction=a-b;
cout<<"substraction of two numbers is:"<<substraction;
multi=a*b;
cout<<"multiplication of two numbers is:"<<multi;
division=a|b;
cout<<" division of two numbers is:"<<division;
getch ();
}

VasanthStrangewayer: Thanq
Similar questions