Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » HElp(This code isnt working... Any help? Just keeps displaying the menu)
HElp [message #1711740] Mon, 19 October 2015 09:27
Eclipse UserFriend
//============================================================================
// 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 Smile ."<<endl;
cin>>val1>>val2;
answer = val1 + val2;
cout<<"The Answer is : "<<answer;
break;

default:
cout<<" Invalid Selection"<<endl;
break;

}



}while(selection !=0);



return 0;
}
Previous Topic:Eclipse CDT and Visual Studio 2013 toolchain
Next Topic:Don't generate binaries
Goto Forum:
  


Current Time: Tue Jun 24 21:01:19 EDT 2025

Powered by FUDForum. Page generated in 0.04024 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top