evviva sono riuscito a farcela
ho capito ...
ora non so spiegare bene posto il cod corretto.
cosi va che è una meraviglia
codice:
#include <iostream>
using namespace std;
int Moltiplicazione(int a , int b);
int Somma(int a , int b);
int main()
{
int calc , num1 , num2 ;
cout << "cosa vuoi fare? " << endl ;
cout << "1- Somma" << endl ;
cout << "2- Moltiplicazione" << endl;
cin >> calc;
if ( calc ==1)
{
Somma ( num1 , num2);
}
else
{
Moltiplicazione( num1 , num2);
}
}
int Somma(int a, int b)
{
int totale;
cout << "Benvenuto nel sommatore automatico..." << endl;
cout << "Primo numero.. " ; cin >> a;
cout << "Secondo numero.. "; cin >> b; cout << endl;
totale= a+b ;
cout << a <<" + "<< b <<" = " << totale << endl;
return totale;
system("PAUSE");
char exit;
cin >> exit;
}
int Moltiplicazione ( int a, int b)
{
int totale;
cout << "Benvenuto nel moltiplicatore automatico..." << endl;
cout << "Primo numero.. " ; cin >> a;
cout << "Secondo numero.. "; cin >> b; cout << endl;
totale= a*b ;
cout << a <<" X "<< b <<" = " << totale << endl;
return totale;
system("PAUSE");
char exit;
cin >> exit;
}