记录详情

Compile Error

foo.c: In function 'main':
foo.c:7:12: error: 'cout' undeclared (first use in this function)
    7 |            cout<<"请输入一个大于0的整数:"<<endl;
      |            ^~~~
foo.c:7:12: note: each undeclared identifier is reported only once for each function it appears in
foo.c:7:44: error: 'endl' undeclared (first use in this function)
    7 |            cout<<"请输入一个大于0的整数:"<<endl;
      |                                            ^~~~
foo.c:8:12: error: 'cin' undeclared (first use in this function)
    8 |            cin>>n;
      |            ^~~
foo.c:9:15: error: expected ';' before 'while'
    9 |            t=n
      |               ^
      |               ;
   10 |            while(n!=0)
      |            ~~~~~
foo.c:15:12: error: expected declaration or statement at end of input
   15 |            cout<<"整数"<<t>>"的各位数之和是:"<<sum\
      |            ^~~~
foo.c:5:17: warning: variable 'sum' set but not used [-Wunused-but-set-variable]
    5 |        int  n,t,sum;
      |                 ^~~
foo.c:5:15: warning: variable 't' set but not used [-Wunused-but-set-variable]
    5 |        int  n,t,sum;
      |               ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
A4-1 回文数专题:数字之和
比赛
2022年迎新赛(第三场)
语言
C
递交时间
2022-09-16 19:12:53
评测时间
2022-09-16 19:12:53
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes