下面这段代码是从键盘读入两个整数,并输出它们的和。其中有6 个错误,快来改正吧!
修改后:
#include <stdio.h>
#include <stdlib.h>
int main( )
{
int a, b, c;
scanf("%d%d",&a,&b);
c=a+b;
printf("%d\n", c);
system("pause");
return 0;
}
运行效果:
下面这段代码是从键盘读入两个整数,并输出它们的和。其中有6 个错误,快来改正吧!
修改后:
#include <stdio.h>
#include <stdlib.h>
int main( )
{
int a, b, c;
scanf("%d%d",&a,&b);
c=a+b;
printf("%d\n", c);
system("pause");
return 0;
}
运行效果: