Write a procedural oriented program for making basicsarithmetic operations over
ID: 3611098 • Letter: W
Question
Write a procedural oriented program for making basicsarithmetic operations over two real operands. The menu-drivenapplication must show in any moment a menu on the console with thefollowing information: value of the first operand X, value of thesecond operand Y, result of the last operation made with thefollowing syntax; “X operator Y = result”, and thefollowing menu options; quit, change X value, change Y value, andthe operations available for being executed +,*, -, /, div,mod. C++ Write a procedural oriented program for making basicsarithmetic operations over two real operands. The menu-drivenapplication must show in any moment a menu on the console with thefollowing information: value of the first operand X, value of thesecond operand Y, result of the last operation made with thefollowing syntax; “X operator Y = result”, and thefollowing menu options; quit, change X value, change Y value, andthe operations available for being executed +,*, -, /, div,mod. C++Explanation / Answer
Dear,
#include <iostream.h>
#include <conio.h>
void main() //mainfunction
{
int ch;
clrscr();
do
{
cout<<"enter x Value :"<<endl;
cin>>x;
cout<<"enter y Value :"<<endl;
cin>>y;
menu();
cout<<"Enter your choice"<<endl;
cin>>ch;
if(ch==1)
add();
else if(ch==2)
sub();
else if(ch==3)
mul();
else if(ch==4)
div();
else if(ch==5)
break;
else
cout<<"Please enter the rightchoice"<<endl;
Ihope this will helpful foryou.............
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.