#include
#include
using namespace std;
float mult(float num1,float num2);
float add(float num1,float num2);
float sub(float num1,float num2);
float divide(float num2,float num2);
int main()
{
int choice;
float num1,num2;
cout<<"---------------------------------------------"<
YOUR CHIOCE IS: ";
cin>>choice;
switch(choice)
{
case 1:
cout<<"Enter the two numbers you want to divide, divisor first!: ";
cin>>num1>> num2;
cin.ignore();
cout<<" "<
case 2:
cout<<"Enter the two numbers you want to add: ";
cin>>num1>> num2;
cin.ignore();
cout<<" "<
case 3:
cout<<"Enter the two numbers you want to subtract”;
cin>>num1>> num2;
cin.ignore();
cout<<" "<
case 4:
cout<<"Enter the two numbers you want to multiply: ";
cin>>num1>>num2;
cin.ignore();
cout<<" "<
default:
cout<<"Invalid Entry!"<
break;
}
cin.ignore();
return 0;
}
float mult(float num1,float num2)
{
return (num1*num2);
}
float add(float num1,float num2)
{
return (num1+num2);
}
float sub(float num1,float num2)
{
return (num1-num2);
}
float divide(float num1,float num2)
{
return (num1/num2);
}
Saturday, August 29, 2009
Home »
C++ CALCULATOR
,
C++ CALCULATOR PROGRAM
,
CALCULATOR
,
CALCULATOR C++ SOURCE CODE
,
CALCULATOR CODE
,
CALCULATOR PROGRAM
,
CALCULATOR SOURCE CODE
» C++ CALCULATOR
C++ CALCULATOR
10:21 PM
C++ CALCULATOR, C++ CALCULATOR PROGRAM, CALCULATOR, CALCULATOR C++ SOURCE CODE, CALCULATOR CODE, CALCULATOR PROGRAM, CALCULATOR SOURCE CODE
No comments
0 comments:
Post a Comment