c语言设计顺序结构程序

如题所述

#include<stdio.h>
main()
{
    int a,b;
    scanf("%d",&a);
    b=a/100+a%100/10+a%10;
    printf("%d",b);
    return 0;
}#include<stdio.h>
main()
{
    int k,y;
    double x;
    scanf("%d,%d",&y,&k);
    x=(y-3)/k;
    printf("%ld",x);
    return 0;
}#include<stdio.h>
main()
{
    char ch;
    printf("%c %c",ch-1,ch+1);
    return 0;
}

都是些基础题型,不会可以追问。

追问

return0是什么

return0是什么

追答

return 0;在主函数中出现代表的是无系统返回值,即执行到这时直接跳出程序了。在基础编程中可以不写,程序不会报错,但为了养成良好习惯,还是写上为好。

温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答