-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path09.cpp
More file actions
47 lines (42 loc) · 649 Bytes
/
09.cpp
File metadata and controls
47 lines (42 loc) · 649 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//9.·¹ÆÛ·±½º º¯¼ö
#include <iostream>
using namespace std;
//int &Calsum(int s, int e)
//{
// int sum = 0;
// for (; s <= e; ++s)
// {
// sum += s;
// }
// return sum;
//}
//int main()
//{
// /*int i = 0;
// int &r = i;*/
//
// int &r1 = Calsum(1, 100);
// int &r2 = Calsum(1, 10);
//
//
// cout << "r1: " << r1 << "r2: " << r2 << endl;
// return 0;
//}
//-------------------------------
int Add(int i, int j)
{
cout << "test1" << endl;
return i + j;
}
//int Add(int &r1, int &r2)
//{
// cout << "test2" << endl;
// return r1 + r2;
//}
int main()
{
cout << Add(2, 3) << endl;
/*int i = 2, j = 3;
cout << Add(i, j) << endl;*/
return 0;
}