hossein_fallah
New Member
ممنون میشم که کسی به من کمک کنه و کد و سورس برای ساخت یه ماشین حساب رو تو هر زبانی به من بده
:d
:d
#include <iostream>
using namespace std;
int main()
{
int input;
float x;
float y;
float z;
cout<<"1.multiply\n";
cout<<"2.Sum\n";
cout<<"3.devide\n";
cout<<"4.distribute\n";
cout<<"5.Exit\n";
cin>> input;
switch ( input ) {
case 1:
cout<<"Give in the three numbers you wish to multiply : ";
cin>> x >> y >> z;
cout<<" The answer is : "<< x*y*z <<"\n";
return main();
break;
case 2:
cout<<"Give in the three numbers you wish to sum : ";
cin>> x >> y >> z;
cout<<" The answer is : "<< x+y+z <<"\n";
return main();
break;
case 3:
cout<<"Give in the two numbers you wish to devide : ";
cin>> x >> y >> z;
cout<<" The answer is : "<< x/y <<"\n";
return main();
break;
case 4:
cout<<"Give in the three numbers you wish to ditribute : ";
cin>> x >> y >> z;
cout<<" The answer is : "<< x-y-z <<"\n";
return main();
break;
case 5:
cout<<" Thank You for trying it out :)\n";
return 0;
}
cin.get ();
return 0;
}