函数定义:void fun(int n,double x){……} 对函数调用 k=fun(10,12.5);为什么是错的

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/04 09:54:37
函数定义:void fun(int n,double x){……} 对函数调用 k=fun(10,12.5);为什么是错的

函数定义:void fun(int n,double x){……} 对函数调用 k=fun(10,12.5);为什么是错的
函数定义:void fun(int n,double x){……} 对函数调用 k=fun(10,12.5);为什么是错的

函数定义:void fun(int n,double x){……} 对函数调用 k=fun(10,12.5);为什么是错的
你定义了fun函数返回是void,也就是无返回值,怎么可以让它赋值给 k 呢?fun(10,12.5);就是对的