Skip to content

Conversation

@antonioialazzo
Copy link

No description provided.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non pushare l'eseguibile

Comment on lines 13 to 20
int input, sum=0;
cout << "Insert the first number: " << endl;
cin >> input;
sum += input;
cout << "Insert the second number: " << endl;
cin >> input;
sum += input;
cout << "Sum: " << sum << endl;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Crea una funzione esterna, fai inserire inserire le variabili e chiama la funzione per la somma

}

int main () {
cout << "Sum: " << Sum() << endl;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fai inserire gli interi non dentro la funzione

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ma funziona? allora va bene

cout << "Insert the second number: " << endl;
cin >> input;
cout << "Sum: " << Sum(sum, input) << endl;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manca return 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants