Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++

#include <iostream>
using namespace std;
int main(void)  {
cout << "Welcom to this small calulator.";
cout << "/n";
cout << "-----------------------------";
cout << "/n";
cout << "please,";
cout << "/n";
cout << "Enter your first number : ";
cin  >> n ;
cout <<"/n";
cout <<"-------- Menu--------"<<endl;
cout <<"1. For Addition. "<<endl;
cout <<"2. For Substraction."<<endl;
cout <<"3. For Multiplication."<<endl;
cout <<"4. For Division."<<endl;
cout <<"---------------------"<<endl;
cin  >> s ;
cout << "/n";
cout <<"Enter your second number: ";
cin  >> r;
cout <<"/n";
switch s { 
case(1):
	t = n+r ;
	
return 0;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
8+3 =