鱼C论坛

 找回密码
 立即注册
查看: 1701|回复: 3

求求大神帮看一下为什么编译不出来

[复制链接]
发表于 2022-4-3 21:54:24 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
这个代码为什么编译不出来

#include <stdio.h>
int main()
{
    printf("This is a C program about a “figure”.\n");
    printf("This is a \nC program.\n");
    printf("你看我穿的一身瓦萨奇,我怎么打。\n");
    printf("This \tis \ta \tC \t program.\n");
    printf("This is a C program.\n");
   
    int x1,y1,z1,a1;
    scanf("%d %d %d",&x1,&y1,&z1);
    a1=x1 * y1 * z1;
    printf("The product is %d\n",a1);
   
    int x2,y2,a2;
    scanf("%d %d",&x2,&y2);
    a2=x2/y2;
    printf("The division is %d\n",a2);
   
    int x3,y3,a3;
    scanf("%d %d",&x3,&y3);
    a3=x3%y3;
    printf("The remainder is %d\n",a3);
   
   
    int x4;
    x4=8+15*(6-2)-1;
    printf("%d\n",x4);
   
    int x5;
    x5=(5*7*(5+(7*5/(7))));
    printf("%d\n",x5);
   
    int x6;
    x6=5%5+5*5-5/5;
    printf("%d\n",x6);
   
    int x7,y7,b,c,d,e,f;
    scanf("%d %d",&x7,&y7);
    b=x7+y7;
    c=x7-y7;
    d=x7*y7;
    e=x7/y7;
    f=x7%y7;
    printf("%d %d %d %d %d",b,c,d,e,f);
   
    int u,a,t,v;
    scanf("%d %d %d",&u,&a,&t);
    v=u+a*t;
    printf("%d",v);
   
    int u2,a2,t2,s;
    scanf("%d %d %d",&u2,&a2,&t2);
    s=u2*t2+1/2*(a2*t2*t2);
    printf("%d",s);
   
    int max,all;
    scanf("%d %d",&max,&all);
    if(all>max)
    {
        printf("%d values the highest rainfall ever.",all);
    }
    else
    {
        printf("%d values the highest rainfall ever.",max);
    }
   
   
    int i=0;
    start;
    if(i<=10)
    {
        printf("%d\t%d\t%d\n",i,i*i,i*i*i);
        i=i+1;
        goto start;
    }
   
}
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2022-4-3 21:58:19 | 显示全部楼层
#include <stdio.h>
int main()
{
    printf("This is a C program about a “figure”.\n");
    printf("This is a \nC program.\n");
    printf("你看我穿的一身瓦萨奇,我怎么打。\n");
    printf("This \tis \ta \tC \t program.\n");
    printf("This is a C program.\n");

    int x1,y1,z1,a1;
    scanf("%d %d %d",&x1,&y1,&z1);
    a1=x1 * y1 * z1;
    printf("The product is %d\n",a1);

    int x2,y2,a2;
    scanf("%d %d",&x2,&y2);
    a2=x2/y2;
    printf("The division is %d\n",a2);

    int x3,y3,a3;
    scanf("%d %d",&x3,&y3);
    a3=x3%y3;
    printf("The remainder is %d\n",a3);


    int x4;
    x4=8+15*(6-2)-1;
    printf("%d\n",x4);

    int x5;
    x5=(5*7*(5+(7*5/(7))));
    printf("%d\n",x5);

    int x6;
    x6=5%5+5*5-5/5;
    printf("%d\n",x6);

    int x7,y7,b,c,d,e,f;
    scanf("%d %d",&x7,&y7);
    b=x7+y7;
    c=x7-y7;
    d=x7*y7;
    e=x7/y7;
    f=x7%y7;
    printf("%d %d %d %d %d",b,c,d,e,f);

    int u,a,t,v;
    scanf("%d %d %d",&u,&a,&t);
    v=u+a*t;
    printf("%d",v);

    int u2,t2,s;
    scanf("%d %d %d",&u2,&a2,&t2);
    s=u2*t2+1/2*(a2*t2*t2);
    printf("%d",s);

    int max,all;
    scanf("%d %d",&max,&all);
    if(all>max)
    {
        printf("%d values the highest rainfall ever.",all);
    }
    else
    {
        printf("%d values the highest rainfall ever.",max);
    }


    int i=0;
start:
    if(i<=10)
    {
        printf("%d\t%d\t%d\n",i,i*i,i*i*i);
        i=i+1;
        goto start;
    }

}
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2022-4-3 22:09:50 | 显示全部楼层
本帖最后由 jackz007 于 2022-4-3 22:12 编辑

        第 52、70句有错误,错误原因已经在代码中标注。
#include <stdio.h>
int main()
{
    printf("This is a C program about a “figure”.\n");
    printf("This is a \nC program.\n");
    printf("你看我穿的一身瓦萨奇,我怎么打。\n");
    printf("This \tis \ta \tC \t program.\n");
    printf("This is a C program.\n");
   
    int x1,y1,z1,a1;
    scanf("%d %d %d",&x1,&y1,&z1);
    a1=x1 * y1 * z1;
    printf("The product is %d\n",a1);
   
    int x2,y2,a2;
    scanf("%d %d",&x2,&y2);
    a2=x2/y2;
    printf("The division is %d\n",a2);
   
    int x3,y3,a3;
    scanf("%d %d",&x3,&y3);
    a3=x3%y3;
    printf("The remainder is %d\n",a3);
   
   
    int x4;
    x4=8+15*(6-2)-1;
    printf("%d\n",x4);
   
    int x5;
    x5=(5*7*(5+(7*5/(7))));
    printf("%d\n",x5);
   
    int x6;
    x6=5%5+5*5-5/5;
    printf("%d\n",x6);
   
    int x7,y7,b,c,d,e,f;
    scanf("%d %d",&x7,&y7);
    b=x7+y7;
    c=x7-y7;
    d=x7*y7;
    e=x7/y7;
    f=x7%y7;
    printf("%d %d %d %d %d",b,c,d,e,f);
   
    int u,a,t,v;
    scanf("%d %d %d",&u,&a,&t);
    v=u+a*t;
    printf("%d",v);
   
    int u2,t2,s;            // 此处变量 a2 属于重复定义,必须去掉。
    scanf("%d %d %d",&u2,&a2,&t2);
    s=u2*t2+1/2*(a2*t2*t2);
    printf("%d",s);
   
    int max,all;
    scanf("%d %d",&max,&all);
    if(all>max)
    {
        printf("%d values the highest rainfall ever.",all);
    }
    else
    {
        printf("%d values the highest rainfall ever.",max);
    }
   
   
    int i=0;
    start:              // 此处的语句标号应该是冒号,不能是分号。
    if(i<=10)
    {
        printf("%d\t%d\t%d\n",i,i*i,i*i*i);
        i=i+1;
        goto start;
    }
   
}
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2022-4-3 22:32:36 | 显示全部楼层
改了之后codeblock也编不出来啊
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-10-5 16:24

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表