小苗小苗 发表于 2022-4-3 21:54:24

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

这个代码为什么编译不出来{:5_104:}

#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;
    }
   
}

ba21 发表于 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;
    }

}

jackz007 发表于 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;
    }
   
}

小苗小苗 发表于 2022-4-3 22:32:36

改了之后codeblock也编不出来啊{:5_104:}
页: [1]
查看完整版本: 求求大神帮看一下为什么编译不出来