编辑代码

#include <iostream>
using namespace std;

//1、无参无返
void ce1 ()
{
    cout << "测试1" << endl;
}

//2、有参无返
void ce2 (int a)
{
    cout << "测试2 a=" << a << endl;
}

//3、无参有返
int ce3 ()
{
    
    return 1000;
}

//4、有参有返
int ce4 (int c)
{
    cout <<"测试4  c=" << c << endl;
    return c;
}


int main()
{
    
    //1、无参无返的调用
    ce1();

    //2、有参无返的调用
    ce2(100);

    //3、无参有返的调用
    int b = ce3();
    cout << "测试3 b=" << b << endl;

    //4、有参有返的调用
    int d = ce4 (10000);
    cout << "d=" << d << endl;


    system("pause");

    return 0;
}