HElp [message #1711740] |
Mon, 19 October 2015 09:27 |
Eclipse User |
|
|
|
//============================================================================
// Name : Simple.cpp
// Author : Seth Setse
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
using namespace std;
int main() {
int val1,val2,answer;
int selection;
do
{
cout<<"Please Select an Item from the Menu :D"<<endl;
cout<<endl;
cout<<"[1] Add two Integer values"<<endl<<"[2] Subtract Two Integer values "<<endl;
cout<<"[3] Multiply two integer values"<<endl<<"[4] Divide two integer values "<<endl;
cout<<"[5] Perform modulo operation on two integers"<<endl<<"[6] Perform type casting from character to integer "<<endl;
cout<<"[0] Exit " <<endl;
cin>>selection;
switch(selection)
{
case 1:
cout<<"Please Input two integer values ."<<endl;
cin>>val1>>val2;
answer = val1 + val2;
cout<<"The Answer is : "<<answer;
break;
default:
cout<<" Invalid Selection"<<endl;
break;
}
}while(selection !=0);
return 0;
}
|
|
|
Powered by
FUDForum. Page generated in 0.04024 seconds