#include<stdio.h> void fun(int a,int b,int c){ c

#include<stdio.h>
void fun(int a,int b,int c){
c#include<stdio.h>
void fun(int a,int b,int c){
c = a * a + b * b;
}
int main(){
int x = 22;
fun(4,2,x);
    printf("%d\n",x);
    return 0;
}
这个是int=22那个位置错了
怎样错,不理解,能否详细说

#include<stdio.h>
#include <stdlib.h>
void fun(int a, int b, int c)
{
c = a * a + b * b;
}
int main()
{
int x = 22;
fun(4, 2, x);
printf("%d\n", x);
system("pause");
return 0;
}

0 错误,编译完全成功,具体的你可以在吧下面那个输出框贴出来(点击我头像,有惊喜)

追问

那个答案是什么

你改后的编译结果

把main函数中的printf输出放到fun函数的最后

这样改怎样

温馨提示:答案为网友推荐,仅供参考
相似回答