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
| #include<iostream> using namespace std;
void test01() { cout << "this is test01" << endl; }
void test02(int a) { cout << "this is test02 =" <<a<< endl; }
int test03() { cout << "this is test03" << endl; return 1000; }
int test04(int num2, int num3) { int sum = num2 + num3; cout << "this is test04" << endl; return sum; } int main() { test01(); test02(100); int num1 = test03(); cout << num1 << endl; int a = 50, b = 150; int c = test04(a, b); cout << c << endl; system("pause"); return 0; }
|