We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8f4676 commit 8cc3eb9Copy full SHA for 8cc3eb9
sum.cpp
@@ -0,0 +1,28 @@
1
+#include <iostream>
2
+using namespace std;
3
+
4
+int sum(int a, int b){
5
+ return a+b;
6
+}
7
8
+int main(){
9
10
+ int x;
11
+ int y;
12
+ int result=0;
13
14
+ cout << "Inserisci il primo numero: " ;
15
+ cin >> x;
16
17
+ cout << endl;
18
19
+ cout << "Inserisci il recondo numero: " ;
20
+ cin >> y;
21
22
23
24
+ result=sum(x,y);
25
+ cout << "Somma: " <<x << "+" <<y << "=" <<result<< endl;
26
27
+ return 0;
28
0 commit comments