submission_id
stringlengths 10
10
| problem_id
stringlengths 6
6
| language
stringclasses 3
values | code
stringlengths 1
522k
| compiler_output
stringlengths 43
10.2k
|
|---|---|---|---|---|
s228932699
|
p00002
|
C
|
/*林承謙 107000108 不分系22*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(int argc, char *argv[]) {
int a1,b1,sum1,tenpower1,i1,digit1;
while(scanf("%d %d", &a1, &b1)!=EOF) {
sum1=a1+b1;i1=0;digit1=-1;
do{
tenpower1=pow(10,i1);
digit1=digit1+1;
i1++;
}while(sum1/tenpower1>=1);
printf("%d\n",digit1);
}
return(0);
|
main.c: In function 'main':
main.c:32:1: error: expected declaration or statement at end of input
32 | return(0);
| ^~~~~~
|
s008662031
|
p00002
|
C
|
/* 1.Ask the user to enter two numbers and calculate the sum of the two number
2.Divide sum by 10 , if the result is bigger than 10 , number of digits increase by 1 */
#include <stdio.h>
#include <stdlib.h>
int main()
{
/* 1.Ask the user to enter two numbers and calculate the sum of the two number */
int a=0 , b=0;
float sum=0 , sumDivided=0; /* Sum be divided by 10 repeatedly */
int numberOfDigits=0; /* number of digits of sum */
int i=0; /* for for loop */
printf("Please enter two numbers\n");
while(scanf("%d%d" ,&a ,&b)!=EOF)
{
/* 2.Divide sum by 10 , then increase the number of digits by 1 , and if the result is bigger than 10 ,
repeat this action again */
sum = a + b;
sumDivided = sum;
if(sum<10)
{
numberOfDigits = 1;
}
else
{
for(i=1 ; sumDivided>10 ; i++)
{
sumDivided = sumDivided / 10.0;
}
numberOfDigits = i;
}
printf("Digits of numbers is %d\n" ,numberOfDigits);
}
return 0;
}
@WendyUsingGithub
|
main.c:43:2: error: stray '@' in program
43 | @WendyUsingGithub
| ^
main.c:43:2: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
|
s258845140
|
p00002
|
C
|
int main(int argc, char *argv[]) {
int num1,num2,i,num3;
while(scanf("%d%d",&num1, &num2)!=EOF){
i = 0;
num3 = num1 + num2;
while (num3 >= 1){
num3 /= 10 ;
i++;
}
printf ("%d",i);
}
return 0;
}
|
main.c: In function 'main':
main.c:3:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
3 | while(scanf("%d%d",&num1, &num2)!=EOF){
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(int argc, char *argv[]) {
main.c:3:16: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
3 | while(scanf("%d%d",&num1, &num2)!=EOF){
| ^~~~~
main.c:3:16: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:3:44: error: 'EOF' undeclared (first use in this function)
3 | while(scanf("%d%d",&num1, &num2)!=EOF){
| ^~~
main.c:3:44: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:3:44: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
10 | printf ("%d",i);
| ^~~~~~
main.c:10:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:10:17: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s075334530
|
p00002
|
C
|
#include <stdio.h>
int main(int argc, const char * argv[]) {
// insert code here...
int a=0,b=0;
printf("請輸入兩個數字(並用空白鍵隔開):");
scanf("%d %d",&a,&b);
int sum=0;
sum = a+b;
double i =0.0;
int pow_result1=0;
int pow_result2=0;
for(i=0;i<6;i++){
pow_result1 = 10^i;
pow_result2 = 10^(i+1);
if(sum>pow_result1&& sum<pow_result2)
printf("number of digits of a + b is %f\n",i+1);
if(sum == pow(10,i+1))
printf("number of digits of a + b is %f\n",i+2);
}
}
|
main.c: In function 'main':
main.c:14:25: error: invalid operands to binary ^ (have 'int' and 'double')
14 | pow_result1 = 10^i;
| ^
main.c:15:25: error: invalid operands to binary ^ (have 'int' and 'double')
15 | pow_result2 = 10^(i+1);
| ^~~~~~
| |
| double
main.c:18:19: error: implicit declaration of function 'pow' [-Wimplicit-function-declaration]
18 | if(sum == pow(10,i+1))
| ^~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'pow'
1 | #include <stdio.h>
+++ |+#include <math.h>
2 |
main.c:18:19: warning: incompatible implicit declaration of built-in function 'pow' [-Wbuiltin-declaration-mismatch]
18 | if(sum == pow(10,i+1))
| ^~~
main.c:18:19: note: include '<math.h>' or provide a declaration of 'pow'
|
s951817441
|
p00002
|
C
|
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{ int a,b;
while(scanf("%d%d",&a,&b)!=EOF)
{ int x=a+b;
int cnt=0;
while(x)
{ cnt++; x/=10;
} printf("%d\n",cnt);
}
return 0; }
|
main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s314042206
|
p00002
|
C
|
#pragma comment (linker,"/STACK:102400000,102400000")
#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
using namespace std;
const int INF = 1e9;
int f[5050][5050];
int b[5050],a[5050];
#define LL long long
int calc(int L,int R)
{
if(L>R) return 0;
if(L==R) return f[L][R] = a[1];
if(f[L][R]!=-1) return f[L][R];
f[L][R] = a[R-L+1];
int i = L,j = R;
LL sum = 0;
LL sum1 = 0;
for(;i<=R;i++)
{
sum1+=b[i];
while(j>i&&sum<sum1) { sum+=b[j];j--;}
if(j<i) break;
if(sum!=sum1) continue;
f[L][R] = min(f[L][R],calc(i+1,j)+a[i-L+1]+a[R-j]);
}
return f[L][R];
}
int main() {
int n;
while(~scanf("%d",&n))
{
if(!n) break;
memset(f,-1,sizeof(f));
for(int i=1;i<=n;i++) scanf("%d",&b[i]);
for(int i=1;i<=n;i++) scanf("%d",&a[i]);
printf("%d\n",calc(1,n));
}
}
|
main.c:2:10: fatal error: iostream: No such file or directory
2 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s511458041
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int a,b,sum,keta,count,answer[200]={'0'};
for(count=0;count<200;count++){
keta=1;
scanf("%d %d",&a,&b);
sum=a+b;
if(sum/10!=0){
keta++;
if(sum/100!=0){
keta++;
if(sum/1000!=0){
keta++;
if(sum/10000!=0){
keta++;
if(sum/100000!=0){
keta++;
if(sum/1000000!=0){
keta++;
}
}
}
}
}
}
answer[count]=keta;
}
for(sum=0;sum<count;sum++){
printf("%d\n",answer[sum]);
}1 1
return 0;
}
|
main.c: In function 'main':
main.c:32:11: error: expected ';' before numeric constant
32 | }1 1
| ^~
| ;
|
s846367859
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int a,b,sum,keta,count,answer[200]={'0'};
for(count=0;count<200;count++){
keta=1;
scanf("%d %d",&a,&b);
sum=a+b;
if(sum/10!=0){
keta++;
if(sum/100!=0){
keta++;
if(sum/1000!=0){
keta++;
if(sum/10000!=0){
keta++;
if(sum/100000!=0){
keta++;
if(sum/1000000!=0){
keta++;
}
}
}
}
}
}
answer[count]=keta;
}
for(sum=0;sum<count;sum++){
printf("%d\n",answer[sum]);
}1 1
return 0;
}
|
main.c: In function 'main':
main.c:32:11: error: expected ';' before numeric constant
32 | }1 1
| ^~
| ;
|
s168388994
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int a,b,sum,keta,count,answer[200]={'0'};
for(count=0;count<200;count++){
keta=1;
scanf("%d %d",&a,&b);
sum=a+b;
if(sum/10!=0){
keta++;
if(sum/100!=0){
keta++;
if(sum/1000!=0){
keta++;
if(sum/10000!=0){
keta++;
if(sum/100000!=0){
keta++;
if(sum/1000000!=0){
keta++;
}
}
}
}
}
}
answer[count]=keta;
}
for(sum=0;sum<count;sum++){
printf("%d\n",answer[sum]);
}1 1
return 0;
}
|
main.c: In function 'main':
main.c:32:11: error: expected ';' before numeric constant
32 | }1 1
| ^~
| ;
|
s058090682
|
p00002
|
C
|
include <stdio.h>
#include <string.h>
int main(int ac, char **argv) {
int a,b;
char buf[100];
while(1) {
scanf("%d %d", &a, &b);
sprintf(buf, "%d", a+b);
printf("%d\n", strlen(buf));
a = 0, b = 0;
}
return 0;
}
|
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
In file included from main.c:2:
/usr/include/string.h:44:22: error: unknown type name 'size_t'
44 | size_t __n) __THROW __nonnull ((1, 2));
| ^~~~~~
/usr/include/string.h:34:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
33 | #include <stddef.h>
+++ |+#include <stddef.h>
34 |
/usr/include/string.h:47:56: error: unknown type name 'size_t'
47 | extern void *memmove (void *__dest, const void *__src, size_t __n)
| ^~~~~~
/usr/include/string.h:47:56: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:55:32: error: unknown type name 'size_t'
55 | int __c, size_t __n)
| ^~~~~~
/usr/include/string.h:55:32: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:61:42: error: unknown type name 'size_t'
61 | extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
| ^~~~~~
/usr/include/string.h:61:42: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:64:56: error: unknown type name 'size_t'
64 | extern int memcmp (const void *__s1, const void *__s2, size_t __n)
| ^~~~~~
/usr/include/string.h:64:56: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:80:60: error: unknown type name 'size_t'
80 | extern int __memcmpeq (const void *__s1, const void *__s2, size_t __n)
| ^~~~~~
/usr/include/string.h:80:60: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:107:48: error: unknown type name 'size_t'
107 | extern void *memchr (const void *__s, int __c, size_t __n)
| ^~~~~~
/usr/include/string.h:107:48: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:145:53: error: unknown type name 'size_t'
145 | const char *__restrict __src, size_t __n)
| ^~~~~~
/usr/include/string.h:145:53: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:153:23: error: unknown type name 'size_t'
153 | size_t __n) __THROW __nonnull ((1, 2));
| ^~~~~~
/usr/include/string.h:153:23: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:159:57: error: unknown type name 'size_t'
159 | extern int strncmp (const char *__s1, const char *__s2, size_t __n)
| ^~~~~~
/usr/include/string.h:159:57: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:166:8: error: unknown type name 'size_t'
166 | extern size_t strxfrm (char *__restrict __dest,
| ^~~~~~
/usr/include/string.h:166:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:167:54: error: unknown type name 'size_t'
167 | const char *__restrict __src, size_t __n)
| ^~~~~~
/usr/include/string.h:167:54: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:179:8: error: unknown type name 'size_t'
179 | extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
| ^~~~~~
/usr/include/string.h:179:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:179:59: error: unknown type name 'size_t'
179 | extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
| ^~~~~~
/usr/include/string.h:179:59: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:195:45: error: unknown type name 'size_t'
195 | extern char *strndup (const char *__string, size_t __n)
| ^~~~~~
/usr/include/string.h:195:45: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:293:8: error: unknown type name 'size_t'
293 | extern size_t strcspn (const char *__s, const char *__reject)
| ^~~~~~
/usr/include/string.h:293:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:297:8: error: unknown type name 'size_t'
297 | extern size_t strspn (const char *__s, const char *__accept)
| ^~~~~~
/usr/include/string.h:297:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:389:46: error: unknown type name 'size_t'
389 | extern void *memmem (const void *__haystack, size_t __haystacklen,
| ^~~~~~
/usr/include/string.h:389:46: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:390:44: error: unknown type name 'size_t'
390 | const void *__needle, size_t __needlelen)
| ^~~~~~
/usr/include/string.h:390:44: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:398:55: error: unknown type name 'size_t'
398 | const void *__restrict __src, size_t __n)
| ^~~~~~
/usr/include/string.h:398:55: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:401:53: error: unknown type name 'size_t'
401 | const void *__restrict __src, size_t __n)
| ^~~~~~
/usr/include/string.h:401:53: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:407:8: error: unknown type name 'size_t'
407 | extern size_t strlen (const char *__s)
| ^~~~~~
/usr/include/string.h:407:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:413:8: error: unknown type name 'size_t'
413 | extern size_t strnlen (const char *__string, size_t __maxlen)
| ^~~~~~
/usr/include/string.h:413:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:413:46: error: unknown type name 'size_t'
413 | extern size_t strnlen (const char *__string, size_t __maxlen)
| ^~~~~~
/usr/include/string.h:413:46: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/string.h:26:
/usr/include/string.h:432:12: error: unknown type name 'size_t'
432 | extern int __REDIRECT_NTH (strerror_r,
| ^~~~~~~~~~~~~~
/usr/include/string.h:432:12: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
In file included from /usr/include/string.h:462:
/usr/include/strings.h:34:54: error: unknown type name 'size_t'
34 | extern int bcmp (const void *__s1, const void *__s2, size_t __n)
| ^~~~~~
/usr/include/strings.h:24:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
23 | #include <stddef.h>
+++ |+#include <stddef.h>
24 |
/usr/include/strings.h:38:53: error: unknown type name 'size_t'
38 | extern void bcopy (const void *__src, void *__dest, size_t __n)
| ^~~~~~
/usr/include/strings.h:38:53: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/strings.h:42:31: error: unknown type name 'size_t'
42 | extern void bzero (void *__s, size_t __n) __THROW __nonnull ((1));
| ^~~~~~
/usr/include/strings.h:42:31: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/strings.h:120:61: error: unknown type name 'size_t'
120 | extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
| ^~~~~~
/usr/include/strings.h:120:61: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/strings.h:134:27: error: unknown type name 'size_t'
134 | size_t __n, locale_t __loc)
| ^~~~~~
/usr/include/strings.h:134:27: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:466:40: error: unknown type na
|
s728557094
|
p00002
|
C
|
#include<stdio.h>
#include<math.h>
#include<time.h>
int main(){
int a = 0;
int b = 0;
int c = 0;
int e = 0;
int r = 0;
srand((unsigned)time(NULL));
r = rand() % 200;
for (int i = 0; i < r; i++)
{
a = rand() % 1000000;
b = rand() % 1000000;
c = a + b;
for (e = 0; c != 0; e++)
{
c /= 10;
}
printf("%d\n", e);
}
return 0;
}
|
main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 'srand' [-Wimplicit-function-declaration]
13 | srand((unsigned)time(NULL));
| ^~~~~
main.c:15:13: error: implicit declaration of function 'rand' [-Wimplicit-function-declaration]
15 | r = rand() % 200;
| ^~~~
|
s228459348
|
p00002
|
C
|
#include<stdio.h>
#include<math.h>
int main(){
int a = 0;
int b = 0;
int c = 0;
int e = 0;
for (int i = 0; i < 200; i++)
{
scanf_s("%d", &a);
scanf_s("%d", &b);
if (a > 1000000)
{
a = 999999;
}
if (b > 1000000)
{
b = 999999;
}
c = a + b;
for (e = 0; c != 0; e++)
{
c /= 10;
}
printf("%d\n", e);
}
return 0;
}
|
main.c: In function 'main':
main.c:13:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
13 | scanf_s("%d", &a);
| ^~~~~~~
| scanf
|
s128601824
|
p00002
|
C
|
#include <stdio.h>
int main(){
int a,b,c,d.i;
while () {scanf("%d %d\n",&a,&b);
c=a+b;
d=1
if (c=0) {printf("1\n");}
else {for (i=1;i<=7;i++) {
if (c<d*10 && c>=d) {printf("%d\n",i);}
d*=10;
}
}
}
return 0;
}
|
main.c: In function 'main':
main.c:4:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
4 | int a,b,c,d.i;
| ^
main.c:5:8: error: expected expression before ')' token
5 | while () {scanf("%d %d\n",&a,&b);
| ^
main.c:7:1: error: 'd' undeclared (first use in this function)
7 | d=1
| ^
main.c:7:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:4: error: expected ';' before 'if'
7 | d=1
| ^
| ;
8 | if (c=0) {printf("1\n");}
| ~~
|
s392401316
|
p00002
|
C
|
#include <stdio.h>
int main(){
int a,b,c,d.i;
while () {scanf("%d %d\n",&a,&b);
c=a+b;
d=1;
if (c=0) {printf("1\n");}
else {for (i=1;i<=7;i++) {
if (c<d*10 && c>=d) {printf("%d\n",i);}
d*=10;
}
}
}
return 0;
}
|
main.c: In function 'main':
main.c:4:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
4 | int a,b,c,d.i;
| ^
main.c:5:8: error: expected expression before ')' token
5 | while () {scanf("%d %d\n",&a,&b);
| ^
main.c:7:1: error: 'd' undeclared (first use in this function)
7 | d=1;
| ^
main.c:7:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:12: error: 'i' undeclared (first use in this function)
9 | else {for (i=1;i<=7;i++) {
| ^
|
s775048776
|
p00002
|
C
|
#include <stdio.h>
int main(){
int a,b,c,d,i;
while (scanf("%d %d\n",&a,&b); !=EOF){
c=a+b;
d=1;
if (c==0) {printf("1\n");}
else {for (i=1;i<=7;i++) {
if (c<d*10 && c>=d) {printf("%d\n",i);}
d*=10;
}
}
}
return 0;
}
|
main.c: In function 'main':
main.c:5:34: error: expected ')' before ';' token
5 | while (scanf("%d %d\n",&a,&b); !=EOF){
| ~ ^
| )
|
s367278588
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b;
int ab;
int s;
int count=0;
scanf("%d",&a);
scanf("%d",&b);
//puts("あいうえお");
ab = a + b;
for(s = 1;1 ; s*=10){
//printf("%d\n", ab/s);
//getchar();
if(ab / s > 0){
count ++;
}else{
break;
}
}
printf("%d",count);
return 0;
|
main.c: In function 'main':
main.c:26:9: error: expected declaration or statement at end of input
26 | return 0;
| ^~~~~~
|
s937998870
|
p00002
|
C
|
include<stdio.h>
int main(){
int a,b;
int s;
while(scanf("%d",&a) != EOF){
int count = 0;
int ab = 0;
scanf("%d",&b);
ab = a + b;
for(s = 1;1 ; s*=10){
if(ab / s > 0){
count ++;
}else{
break;
}
}
printf("%d\n",count);
}
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s145480849
|
p00002
|
C
|
#include<stdio.h>
#include<string.h>
int main(){
int a,b,total=1,i=10,j,ab;
whlie(1){
scanf("%d %d",&a,&b);
ab=a+b;
for(j=0;j<6;j++){
if(ab/i>=1){
total++;
}
i=10*i;
}
printf("%d\n",total);
}
return(0);
}
|
main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'whlie' [-Wimplicit-function-declaration]
5 | whlie(1){
| ^~~~~
main.c:5:11: error: expected ';' before '{' token
5 | whlie(1){
| ^
| ;
|
s219839131
|
p00002
|
C
|
#include<stdio.h>
#include<string.h>
int main(){
int a,b,total=1,i=10,j,ab;
whlie(1){
scanf("%d",&a);
scanf("%d",&b);
ab=a+b;
for(j=0;j<6;j++){
if(ab/i>=1){
total++;
}
i=10*i;
}
printf("%d\n",total);
}
return(0);
}
|
main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'whlie' [-Wimplicit-function-declaration]
5 | whlie(1){
| ^~~~~
main.c:5:11: error: expected ';' before '{' token
5 | whlie(1){
| ^
| ;
|
s528497372
|
p00002
|
C
|
#include<stdio.h>
#include<string.h>
int main(){
char a[1000001];
char b[1000001];
char c;
int len;
scanf("%s %s",a,b);
c=a+b;
len = strlen(c);
printf("%d\n",len);
return 0;
}
|
main.c: In function 'main':
main.c:9:12: error: invalid operands to binary + (have 'char *' and 'char *')
9 | c=a+b;
| ~^
| ||
| |char *
| char *
main.c:10:22: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
10 | len = strlen(c);
| ^
| |
| char
In file included from main.c:2:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'char'
407 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
|
s641270751
|
p00002
|
C
|
#include<stdio.h>
int main(void){
Int i,a,b,c;
scanf("%d %d",&a,&b);
c=a+b;
for(i=0;c<10;i++){
c=c/10;
}
printf("%d\n",i);
return(0);
}
|
main.c: In function 'main':
main.c:3:1: error: unknown type name 'Int'; did you mean 'int'?
3 | Int i,a,b,c;
| ^~~
| int
|
s469043100
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int i,a,b,c;
while(0){
scanf("%d %d",&a,&b);
If(a==EOF)
break;
c=a+b;
for(i=1;c>10;i++){
c=c/10;
}
printf("%d\n",i);
}
return(0);
}
|
main.c: In function 'main':
main.c:6:1: error: implicit declaration of function 'If' [-Wimplicit-function-declaration]
6 | If(a==EOF)
| ^~
main.c:6:11: error: expected ';' before 'break'
6 | If(a==EOF)
| ^
| ;
7 | break;
| ~~~~~
|
s098693779
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int i,a,b,c;
while(0){
scanf("%d %d",&a,&b);
If(a==EOF)
return(0);
c=a+b;
for(i=1;c>10;i++){
c=c/10;
}
printf("%d\n",i);
}
return(0);
}
|
main.c: In function 'main':
main.c:6:1: error: implicit declaration of function 'If' [-Wimplicit-function-declaration]
6 | If(a==EOF)
| ^~
main.c:6:11: error: expected ';' before 'return'
6 | If(a==EOF)
| ^
| ;
7 | return(0);
| ~~~~~~
|
s379171920
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int i,a,b,c;
while(0){
scanf("%d %d",&a,&b);
If(a==EOF){
break;
}
c=a+b;
for(i=1;c>10;i++){
c=c/10;
}
printf("%d\n",i);
}
return(0);
}
|
main.c: In function 'main':
main.c:6:1: error: implicit declaration of function 'If' [-Wimplicit-function-declaration]
6 | If(a==EOF){
| ^~
main.c:6:11: error: expected ';' before '{' token
6 | If(a==EOF){
| ^
| ;
|
s983839755
|
p00002
|
C
|
#include <stdio.h>
int main(void){
int a,b,n,i;
printf("\n")
while(scanf("%d",&a) != EOF){
scanf("%d",&b);
n = a + b;
i = 0;
while (n != 0){
i = i + 1;
n = n/10;
}
printf("%d\n",i);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:17: error: expected ';' before 'while'
5 | printf("\n")
| ^
| ;
6 | while(scanf("%d",&a) != EOF){
| ~~~~~
|
s979937082
|
p00002
|
C
|
#include<stdio.h>
int main(){
int num1,num2,num,sum;
nun=1;
scanf("%d%d",&num1,&num2);
sum=num1+num2;
while(sum>9){
sum=sum/10;
num++;
}
printf("%d\n",num);
return 0;
}
|
main.c: In function 'main':
main.c:4:3: error: 'nun' undeclared (first use in this function); did you mean 'num'?
4 | nun=1;
| ^~~
| num
main.c:4:3: note: each undeclared identifier is reported only once for each function it appears in
|
s855335313
|
p00002
|
C
|
#include <stdio.h>
int main(void){
int a,c,t;
while(scanf("%d %d",&a,&???) != EOF){
c=a+???;
for(t=0;c!=0;t++){
c = c/10;
}
printf("%d\n",t);
}
return;
}
|
main.c: In function 'main':
main.c:5:34: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
5 | while(scanf("%d %d",&a,&???) != EOF){
main.c:5:33: error: expected expression before '?' token
5 | while(scanf("%d %d",&a,&???) != EOF){
| ^
main.c:6:21: error: expected expression before '?' token
6 | c=a+???;
| ^
main.c:12:9: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
12 | return;
| ^~~~~~
main.c:3:5: note: declared here
3 | int main(void){
| ^~~~
|
s579770040
|
p00002
|
C
|
int main(int argc,const char *argv[]){
int a,b,keta,c,i;
while(EOF){
keta=0;
scanf("%d %d",&a,&b);
a=a+b;
for(i=0;i<=1000000;i=i*10){
a=a/10;
if(a==0){
keta++;
break;
}
keta++;
}
printf("%d\n",keta);
}
return 0;
}
|
main.c: In function 'main':
main.c:3:11: error: 'EOF' undeclared (first use in this function)
3 | while(EOF){
| ^~~
main.c:1:1: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
+++ |+#include <stdio.h>
1 | int main(int argc,const char *argv[]){
main.c:3:11: note: each undeclared identifier is reported only once for each function it appears in
3 | while(EOF){
| ^~~
main.c:5:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
5 | scanf("%d %d",&a,&b);
| ^~~~~
main.c:5:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
main.c:5:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:15:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
15 | printf("%d\n",keta);
| ^~~~~~
main.c:15:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:15:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:15:9: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s509880858
|
p00002
|
C
|
include<stdio.h>
int main()
{
int a[10][2];
int i,sum,j,k=0;
for(k=0;k<3;k++){
for(i=0;i<2;i++){
scanf("%d",&a[k][i]);
}
sum=a[k][0]+a[k][1];
j=0;
while(sum>=1){
sum=sum/10;
j=j+1;
}
printf("%d\n",j);
}
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s145754802
|
p00002
|
C
|
include<stdio.h>
int main()
{
int a[10][2],m[3];
int i,sum,j,k=0;
for(k=0;k<3;k++){
for(i=0;i<2;i++){
scanf("%d",&a[k][i]);
}
sum=a[k][0]+a[k][1];
j=0;
while(sum>=1){
sum=sum/10;
j=j+1;
}
m[k]=j;
}
for(i=0;i<3;i++){
printf("%d\n",m[i]);
}
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s264253870
|
p00002
|
C
|
include <stdio.h>
#include <string.h>
int lng(int x){
int cnt=0;
while(x>0){
cnt++;
x=x/10;
}
return cnt;
}
int main(void){
int a, b, ans;
int a_lng, b_lng;
char s[20]="";
while(strcmp(s, "EOF") != 0){
printf("Input two non-negative numbers:");
scanf("%d %d", &a, &b);
a_lng=lng(a);
b_lng=lng(b);
if(0>a || b>1000000 || a_lng>200 || b_lng>200){
printf("error\n");
return 0;
}
ans=a+b;
printf("\n");
printf("%d\n", lng(ans));
printf("If you input the EOF, this program is ended.");
scanf("%s", s);
}
}
|
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
In file included from main.c:2:
/usr/include/string.h:44:22: error: unknown type name 'size_t'
44 | size_t __n) __THROW __nonnull ((1, 2));
| ^~~~~~
/usr/include/string.h:34:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
33 | #include <stddef.h>
+++ |+#include <stddef.h>
34 |
/usr/include/string.h:47:56: error: unknown type name 'size_t'
47 | extern void *memmove (void *__dest, const void *__src, size_t __n)
| ^~~~~~
/usr/include/string.h:47:56: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:55:32: error: unknown type name 'size_t'
55 | int __c, size_t __n)
| ^~~~~~
/usr/include/string.h:55:32: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:61:42: error: unknown type name 'size_t'
61 | extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
| ^~~~~~
/usr/include/string.h:61:42: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:64:56: error: unknown type name 'size_t'
64 | extern int memcmp (const void *__s1, const void *__s2, size_t __n)
| ^~~~~~
/usr/include/string.h:64:56: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:80:60: error: unknown type name 'size_t'
80 | extern int __memcmpeq (const void *__s1, const void *__s2, size_t __n)
| ^~~~~~
/usr/include/string.h:80:60: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:107:48: error: unknown type name 'size_t'
107 | extern void *memchr (const void *__s, int __c, size_t __n)
| ^~~~~~
/usr/include/string.h:107:48: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:145:53: error: unknown type name 'size_t'
145 | const char *__restrict __src, size_t __n)
| ^~~~~~
/usr/include/string.h:145:53: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:153:23: error: unknown type name 'size_t'
153 | size_t __n) __THROW __nonnull ((1, 2));
| ^~~~~~
/usr/include/string.h:153:23: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:159:57: error: unknown type name 'size_t'
159 | extern int strncmp (const char *__s1, const char *__s2, size_t __n)
| ^~~~~~
/usr/include/string.h:159:57: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:166:8: error: unknown type name 'size_t'
166 | extern size_t strxfrm (char *__restrict __dest,
| ^~~~~~
/usr/include/string.h:166:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:167:54: error: unknown type name 'size_t'
167 | const char *__restrict __src, size_t __n)
| ^~~~~~
/usr/include/string.h:167:54: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:179:8: error: unknown type name 'size_t'
179 | extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
| ^~~~~~
/usr/include/string.h:179:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:179:59: error: unknown type name 'size_t'
179 | extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
| ^~~~~~
/usr/include/string.h:179:59: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:195:45: error: unknown type name 'size_t'
195 | extern char *strndup (const char *__string, size_t __n)
| ^~~~~~
/usr/include/string.h:195:45: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:293:8: error: unknown type name 'size_t'
293 | extern size_t strcspn (const char *__s, const char *__reject)
| ^~~~~~
/usr/include/string.h:293:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:297:8: error: unknown type name 'size_t'
297 | extern size_t strspn (const char *__s, const char *__accept)
| ^~~~~~
/usr/include/string.h:297:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:389:46: error: unknown type name 'size_t'
389 | extern void *memmem (const void *__haystack, size_t __haystacklen,
| ^~~~~~
/usr/include/string.h:389:46: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:390:44: error: unknown type name 'size_t'
390 | const void *__needle, size_t __needlelen)
| ^~~~~~
/usr/include/string.h:390:44: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:398:55: error: unknown type name 'size_t'
398 | const void *__restrict __src, size_t __n)
| ^~~~~~
/usr/include/string.h:398:55: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:401:53: error: unknown type name 'size_t'
401 | const void *__restrict __src, size_t __n)
| ^~~~~~
/usr/include/string.h:401:53: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:407:8: error: unknown type name 'size_t'
407 | extern size_t strlen (const char *__s)
| ^~~~~~
/usr/include/string.h:407:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:413:8: error: unknown type name 'size_t'
413 | extern size_t strnlen (const char *__string, size_t __maxlen)
| ^~~~~~
/usr/include/string.h:413:8: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:413:46: error: unknown type name 'size_t'
413 | extern size_t strnlen (const char *__string, size_t __maxlen)
| ^~~~~~
/usr/include/string.h:413:46: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/string.h:26:
/usr/include/string.h:432:12: error: unknown type name 'size_t'
432 | extern int __REDIRECT_NTH (strerror_r,
| ^~~~~~~~~~~~~~
/usr/include/string.h:432:12: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
In file included from /usr/include/string.h:462:
/usr/include/strings.h:34:54: error: unknown type name 'size_t'
34 | extern int bcmp (const void *__s1, const void *__s2, size_t __n)
| ^~~~~~
/usr/include/strings.h:24:1: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
23 | #include <stddef.h>
+++ |+#include <stddef.h>
24 |
/usr/include/strings.h:38:53: error: unknown type name 'size_t'
38 | extern void bcopy (const void *__src, void *__dest, size_t __n)
| ^~~~~~
/usr/include/strings.h:38:53: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/strings.h:42:31: error: unknown type name 'size_t'
42 | extern void bzero (void *__s, size_t __n) __THROW __nonnull ((1));
| ^~~~~~
/usr/include/strings.h:42:31: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/strings.h:120:61: error: unknown type name 'size_t'
120 | extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
| ^~~~~~
/usr/include/strings.h:120:61: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/strings.h:134:27: error: unknown type name 'size_t'
134 | size_t __n, locale_t __loc)
| ^~~~~~
/usr/include/strings.h:134:27: note: 'size_t' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>'
/usr/include/string.h:466:40: error: unknown type na
|
s790474953
|
p00002
|
C
|
#include <stdio.h>
#include <string.h>
int main(void){
int a, b, ans;
char s[20]="";
int cnt=0;
while(strcmp(s, "EOF") != 0){
scanf("%d %d", &a, &b);
a_lng=lng(a);
b_lng=lng(b);
ans=a+b;
while(ans>0){
cnt++;
ans=ans/10;
}
printf("\n");
printf("%d\n", lng(ans)); scanf("%s", s);
cnt=0;
}
}
|
main.c: In function 'main':
main.c:11:5: error: 'a_lng' undeclared (first use in this function)
11 | a_lng=lng(a);
| ^~~~~
main.c:11:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:11: error: implicit declaration of function 'lng' [-Wimplicit-function-declaration]
11 | a_lng=lng(a);
| ^~~
main.c:12:5: error: 'b_lng' undeclared (first use in this function)
12 | b_lng=lng(b);
| ^~~~~
|
s836746635
|
p00002
|
C
|
#include <stdio.h>
#include <string.h>
int main(void){
int a, b, ans;
char s[20]="";
int cnt=0;
while(strcmp(s, "EOF") != 0){
scanf("%d %d", &a, &b);
ans=a+b;
while(ans>0){
cnt++;
ans=ans/10;
}
printf("\n");
printf("%d\n", lng(ans)); scanf("%s", s);
cnt=0;
}
}
|
main.c: In function 'main':
main.c:17:21: error: implicit declaration of function 'lng' [-Wimplicit-function-declaration]
17 | printf("%d\n", lng(ans)); scanf("%s", s);
| ^~~
|
s781751501
|
p00002
|
C
|
include<stdio.h>
int main()
{
int a[200][2];
int i,sum,j,k;
for(;;){
k=0;
k++;
for(i=0;i<2;i++){
scanf("%d",&a[k][i]);
}
sum=a[k][0]+a[k][1];
j=0;
while(sum>=1){
sum=sum/10;
j=j+1;
}
printf("%d\n",j);
}
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s564250298
|
p00002
|
C
|
#include <stdio.h>
int main(void){
int a, b, ans;
int cnt;
while((scanf("%d %d", &a, &b))!=EOF){
cnt=0;
ans=a+b;
while(x>0){
cnt++;
x=x/10;
}
printf("%d\n", lng(ans));
}
}
|
main.c: In function 'main':
main.c:10:11: error: 'x' undeclared (first use in this function)
10 | while(x>0){
| ^
main.c:10:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:21: error: implicit declaration of function 'lng' [-Wimplicit-function-declaration]
14 | printf("%d\n", lng(ans));
| ^~~
|
s094814813
|
p00002
|
C
|
#include <stdio.h>
int main(void){
int a, b, ans;
int cnt;
while((scanf("%d %d", &a, &b))!=EOF){
cnt=0;
ans=a+b;
while(x>0){
cnt++;
ans=ans/10;
}
printf("%d\n", lng(ans));
}
}
|
main.c: In function 'main':
main.c:10:11: error: 'x' undeclared (first use in this function)
10 | while(x>0){
| ^
main.c:10:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:21: error: implicit declaration of function 'lng' [-Wimplicit-function-declaration]
14 | printf("%d\n", lng(ans));
| ^~~
|
s727731735
|
p00002
|
C
|
#include <stdio.h>
int main(void){
int a, b, ans;
int cnt;
while((scanf("%d %d", &a, &b))!=EOF){
cnt=0;
ans=a+b;
while(ans>0){
cnt++;
ans=ans/10;
}
printf("%d\n", lng(ans));
}
}
|
main.c: In function 'main':
main.c:14:21: error: implicit declaration of function 'lng' [-Wimplicit-function-declaration]
14 | printf("%d\n", lng(ans));
| ^~~
|
s004440489
|
p00002
|
C
|
include<stdio.h>
int main()
{
int a[200][2];
int i,sum,j,k;
for(;;){
k=0;
k++;
for(i=0;i<2;i++){
scanf("%d",&a[k][i]);
}
sum=a[k][0]+a[k][1];
j=0;
while(sum>=1){
sum=sum/10;
j=j+1;
}
printf("%d\n",j);
}
return 0;
}
|
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s885190627
|
p00002
|
C
|
#include <stdio.h>
int digit(int SUM){
int i;
for(i = 0; SUM >= 10; i++){
SUM %= 10;
}
return i;
}
int main(void) {
int a, b, sum, d
scanf("%d %d", a, b);
sum = a + b;
d = digit(sum);
printf("%d\n", d);
return 0;
}
|
main.c: In function 'main':
main.c:14:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
14 | scanf("%d %d", a, b);
| ^~~~~
main.c:17:3: error: 'd' undeclared (first use in this function)
17 | d = digit(sum);
| ^
main.c:17:3: note: each undeclared identifier is reported only once for each function it appears in
|
s835903779
|
p00002
|
C
|
#include <stdio.h>
int main(void){
int a, b, sum, i;
scanf("%d %d", a, b);
sum = a + b;
for(i = 0; SUM >= 10; i++){
SUM %= 10;
}
printf("%d\n", i);
return 0;
}
|
main.c: In function 'main':
main.c:8:14: error: 'SUM' undeclared (first use in this function)
8 | for(i = 0; SUM >= 10; i++){
| ^~~
main.c:8:14: note: each undeclared identifier is reported only once for each function it appears in
|
s411071861
|
p00002
|
C
|
#include <stdio.h>
int main(void){
int a, b, sum, i;
scanf("%d %d", &a, &b);
sum = a + b;
i = 1;
for(i = 1; sum >= 10; i++){
sum %= 10;
j += 1;
}
printf("%d\n", j);
return 0;
}
|
main.c: In function 'main':
main.c:11:5: error: 'j' undeclared (first use in this function)
11 | j += 1;
| ^
main.c:11:5: note: each undeclared identifier is reported only once for each function it appears in
|
s547517790
|
p00002
|
C
|
#include <stdio.h>
int calc_digit(int c)
{
int d;
d = 0;
do{
c /= 10;
d++;
} while(c != 0);
return d;
}
int main(){
int i;
int a, b;
int ret;
int d;
for(i = 0; i < 200; i++){
ret = scanf("%d %d", &a, &b);
if(ret != EOF){
printf("%d\n", calcdigit(a + b));
}else{
break;
}
}
return 0;
}
|
main.c: In function 'main':
main.c:24:28: error: implicit declaration of function 'calcdigit'; did you mean 'calc_digit'? [-Wimplicit-function-declaration]
24 | printf("%d\n", calcdigit(a + b));
| ^~~~~~~~~
| calc_digit
|
s785368967
|
p00002
|
C
|
#include <stdio.h>
int calc_digit(int c)
{
int d;
d = 0;
do{
c /= 10;
d++;
} while(c != 0);
return d;
}
int main(){
int i;
int a, b;
int ret;
for(i = 0; i < 200; i++){
ret = scanf("%d %d", &a, &b);
if(ret != EOF){
printf("%d\n", calcdigit(a + b));
}else{
break;
}
}
return 0;
}
|
main.c: In function 'main':
main.c:23:28: error: implicit declaration of function 'calcdigit'; did you mean 'calc_digit'? [-Wimplicit-function-declaration]
23 | printf("%d\n", calcdigit(a + b));
| ^~~~~~~~~
| calc_digit
|
s420883662
|
p00002
|
C
|
#include <stdio.h>
main(void)
{
do{
int a,b,c=0,d,e;
scanf("%d %d",&a,&b);
d=a+b;
while(d!=0){
d/=10;
c++;
}
printf("%d\n",c);
}while(++e<201)
return 0;
}
|
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(void)
| ^~~~
main.c: In function 'main':
main.c:18:18: error: 'e' undeclared (first use in this function)
18 | }while(++e<201)
| ^
main.c:18:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:24: error: expected ';' before 'return'
18 | }while(++e<201)
| ^
| ;
19 | return 0;
| ~~~~~~
|
s850455185
|
p00002
|
C
|
#include<stdio.h>
int main()
{
int a,b,c;
scanf("%d %d",&a,&b);
c=a+b;
int keta=1;
while(1)
{
if((c/10)==0)break;
else
{
keta++;
c/=10;
}
}
printf("%d",keta);
}
return 0;
}
|
main.c:24:3: error: expected identifier or '(' before 'return'
24 | return 0;
| ^~~~~~
main.c:25:1: error: expected identifier or '(' before '}' token
25 | }
| ^
|
s097955784
|
p00002
|
C
|
#include<stdio.h>
int main()
{
unsinged int a,b;
int keta;
int sum;
scanf("%d %d",&a,&b);
for(sum=a+b,keta=1;sum/10!=0;sum/=10)keta++;
printf("%d\n",keta);
return 0;
}
|
main.c: In function 'main':
main.c:5:3: error: 'unsinged' undeclared (first use in this function)
5 | unsinged int a,b;
| ^~~~~~~~
main.c:5:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:11: error: expected ';' before 'int'
5 | unsinged int a,b;
| ^~~~
| ;
main.c:9:18: error: 'a' undeclared (first use in this function)
9 | scanf("%d %d",&a,&b);
| ^
main.c:9:21: error: 'b' undeclared (first use in this function)
9 | scanf("%d %d",&a,&b);
| ^
|
s650214929
|
p00002
|
C
|
#include<stdio.h>
int main()
{
unsignedint a,b;
int keta;
int sum;
scanf("%d %d",&a,&b);
for(sum=a+b,keta=1;sum/10!=0;sum/=10)keta++;
printf("%d\n",keta);
return 0;
}
|
main.c: In function 'main':
main.c:5:3: error: unknown type name 'unsignedint'; did you mean 'unsigned int'?
5 | unsignedint a,b;
| ^~~~~~~~~~~
| unsigned int
|
s434988767
|
p00002
|
C
|
#include<stdio.h>
int main()
{
unsignedint a,b;
int keta;
int sum;
scanf("%ud %ud",&a,&b);
for(sum=a+b,keta=1;sum/10!=0;sum/=10)keta++;
printf("%d\n",keta);
return 0;
}
|
main.c: In function 'main':
main.c:5:3: error: unknown type name 'unsignedint'; did you mean 'unsigned int'?
5 | unsignedint a,b;
| ^~~~~~~~~~~
| unsigned int
|
s437762789
|
p00002
|
C
|
#incldue<stdio.h>
#include<math.h>
int main(){
int a,b;
while(scanf("%d %d",a,b)!=EOF){
a+=b;
printf("%d\n",(int)log10(a));
}
return 0;
}
|
main.c:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
1 | #incldue<stdio.h>
| ^~~~~~~
| include
main.c: In function 'main':
main.c:5:7: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
5 | while(scanf("%d %d",a,b)!=EOF){
| ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
2 | #include<math.h>
+++ |+#include <stdio.h>
3 | int main(){
main.c:5:7: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
5 | while(scanf("%d %d",a,b)!=EOF){
| ^~~~~
main.c:5:7: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:27: error: 'EOF' undeclared (first use in this function)
5 | while(scanf("%d %d",a,b)!=EOF){
| ^~~
main.c:5:27: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:5:27: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
7 | printf("%d\n",(int)log10(a));
| ^~~~~~
main.c:7:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:1: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s476629074
|
p00002
|
C
|
#include <stdio.h>
int main(void) {
int a,b;
int total;
int digit = 0;
while(true) {
scanf("%d%d",&a, &b);
total = a + b;
while( total != 0){
total /= 10;
digit++;
}
printf("%d", digit);
}
return 0;
}
|
main.c: In function 'main':
main.c:9:15: error: 'true' undeclared (first use in this function)
9 | while(true) {
| ^~~~
main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include <stdio.h>
+++ |+#include <stdbool.h>
2 |
main.c:9:15: note: each undeclared identifier is reported only once for each function it appears in
9 | while(true) {
| ^~~~
|
s710439205
|
p00002
|
C
|
#include<stdio.h>
#include<string.h>
int main(void) {
int a, b;
char ch[16];
while (scanf("%d %d"&a,&b) != EOF) {
sprintf(ch, "%d", a + b);
printf("%d", strlen(ch));
}
return 0;
}
|
main.c: In function 'main':
main.c:8:29: error: invalid operands to binary & (have 'char *' and 'int')
8 | while (scanf("%d %d"&a,&b) != EOF) {
| ~~~~~~~^
| |
| char *
|
s812955328
|
p00002
|
C
|
#include<stdio.h>
#include<string.h>
int main(void) {
int a, b;
char ch(16);
while (scanf("%d %d",&a,&b) != EOF) {
sprintf(ch, "%d", a + b);
printf("%d\n", strlen(ch));
}
return 0;
}
|
main.c: In function 'main':
main.c:6:17: error: expected declaration specifiers or '...' before numeric constant
6 | char ch(16);
| ^~
main.c:9:25: error: 'ch' undeclared (first use in this function)
9 | sprintf(ch, "%d", a + b);
| ^~
main.c:9:25: note: each undeclared identifier is reported only once for each function it appears in
|
s940017834
|
p00002
|
C
|
#include <iostream>
using namespace std;
int main(){
int a, b, c;
while ( cin >> a >> b ) {
a += b;
ans = 0;
while( a > 0 , c++ , a /= 10 );
cout << c << endl;
}
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s339959344
|
p00002
|
C
|
#include <iostream>
using namespace std;
int main(){
int a, b, c;
while ( cin >> a >> b ) {
a += b;
ans = 0;
while( a > 0 , c++ , a /= 10 );
cout << c << endl;
}
}
|
main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s786846565
|
p00002
|
C
|
#include <math.h>
#include <stdio.h>
int main()
{
int a, b;
while (scanf("%d %d", a, b));
{
printf("%d\n", static_cast<int>(log10(a + b)) + 1);
}
return 0;
}
|
main.c: In function 'main':
main.c:10:32: error: 'static_cast' undeclared (first use in this function)
10 | printf("%d\n", static_cast<int>(log10(a + b)) + 1);
| ^~~~~~~~~~~
main.c:10:32: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:44: error: expected expression before 'int'
10 | printf("%d\n", static_cast<int>(log10(a + b)) + 1);
| ^~~
|
s828204717
|
p00002
|
C
|
#include <stdio.h>
int main(){
int a,b,sum,counter,i;
while(scanf("%d %d",%a,&b); != -1){
sum = a + b;
for (i=0; sum!=0; i++){
sum = sum / 10;
}
printf("%d\n",i);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:23: error: expected expression before '%' token
5 | while(scanf("%d %d",%a,&b); != -1){
| ^
main.c:5:29: error: expected ')' before ';' token
5 | while(scanf("%d %d",%a,&b); != -1){
| ~ ^
| )
|
s108863768
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int a[3], b[3], c[3], i,j;
for(i=0;i<3;i++){
scanf("%d %d", &a[i], &b[i]);
c[i]=a[i]+b[i];
}
for(j=0;j<3;j++)
for(i=0;i<20;i++){
c[j]=c[j]/10;
if(c[j]<0){c[j]=i;break;}
}
for(i=0;i<3;i++)
printf("%d\n", strlen(str[i]));
return 0;}
|
main.c: In function 'main':
main.c:16:16: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
16 | printf("%d\n", strlen(str[i]));
| ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
1 | #include<stdio.h>
+++ |+#include <string.h>
2 |
main.c:16:16: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
16 | printf("%d\n", strlen(str[i]));
| ^~~~~~
main.c:16:16: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:16:23: error: 'str' undeclared (first use in this function)
16 | printf("%d\n", strlen(str[i]));
| ^~~
main.c:16:23: note: each undeclared identifier is reported only once for each function it appears in
|
s827192190
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b;
int i=0;
for(i=0;i<200,i++){
scanf("%d %d",&a,&b);
printf("%d\n",a+b/10);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:18: error: expected ';' before ')' token
5 | for(i=0;i<200,i++){
| ^
| ;
|
s311151391
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b;
int i;
for(i=0;i<200;i++){
if(scanf("%d %d",&a,&b)==EOF){
break;
}else{
c=(a+b)/10
printf("%d\n",c);
}
}
return 0;
}
|
main.c: In function 'main':
main.c:9:1: error: 'c' undeclared (first use in this function)
9 | c=(a+b)/10
| ^
main.c:9:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:11: error: expected ';' before 'printf'
9 | c=(a+b)/10
| ^
| ;
10 | printf("%d\n",c);
| ~~~~~~
|
s365539759
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b;
int i;
for(i=0;i<200;i++){
if(scanf("%d %d",&a,&b)==EOF){
break;
}else{
c=(a+b)/10;
printf("%d\n",c);
}
}
return 0;
}
|
main.c: In function 'main':
main.c:9:1: error: 'c' undeclared (first use in this function)
9 | c=(a+b)/10;
| ^
main.c:9:1: note: each undeclared identifier is reported only once for each function it appears in
|
s630869632
|
p00002
|
C
|
#include <stdio.h>
int main(){
int a,b,count;
while(scanf("%d %d", &a, &b) != EOF){
a = a + b;
count = 0
while(a > 0){
a = a / 10;
count++;
}
printf("%d\n", count);
}
return 0;
}
|
main.c: In function 'main':
main.c:7:26: error: expected ';' before 'while'
7 | count = 0
| ^
| ;
8 |
9 | while(a > 0){
| ~~~~~
|
s274637542
|
p00002
|
C
|
#include <stdio.h>
int main(void)
{
int a,b,i;
scanf("%d",&a);
scanf("%d",&b);
for(i=1;a+b=!0;i++){
sum=(a+b)/10;
}
printf("%d",i);
return 0;
}
|
main.c: In function 'main':
main.c:10:12: error: lvalue required as left operand of assignment
10 | for(i=1;a+b=!0;i++){
| ^
main.c:11:5: error: 'sum' undeclared (first use in this function)
11 | sum=(a+b)/10;
| ^~~
main.c:11:5: note: each undeclared identifier is reported only once for each function it appears in
|
s335273096
|
p00002
|
C
|
#include <stdio.h>
int main(void)
{
int a,b,sum;
scanf("%d",&a);
scanf("%d",&b);
sum=a+b;
sum=(int)log10(c)+1;
printf("%d",sum);
return 0;
}
|
main.c: In function 'main':
main.c:9:12: error: implicit declaration of function 'log10' [-Wimplicit-function-declaration]
9 | sum=(int)log10(c)+1;
| ^~~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'log10'
1 | #include <stdio.h>
+++ |+#include <math.h>
2 |
main.c:9:12: warning: incompatible implicit declaration of built-in function 'log10' [-Wbuiltin-declaration-mismatch]
9 | sum=(int)log10(c)+1;
| ^~~~~
main.c:9:12: note: include '<math.h>' or provide a declaration of 'log10'
main.c:9:18: error: 'c' undeclared (first use in this function)
9 | sum=(int)log10(c)+1;
| ^
main.c:9:18: note: each undeclared identifier is reported only once for each function it appears in
|
s200309307
|
p00002
|
C
|
#include <stdio.h>
int a,b,c,ans;
scanf("%d",&a);
scanf("%d",&b);
c=a+b;
ans=(int)log10(c)+1;
printf("%d",ans);
}
|
main.c:4:7: error: expected declaration specifiers or '...' before string constant
4 | scanf("%d",&a);
| ^~~~
main.c:4:12: error: expected declaration specifiers or '...' before '&' token
4 | scanf("%d",&a);
| ^
main.c:5:7: error: expected declaration specifiers or '...' before string constant
5 | scanf("%d",&b);
| ^~~~
main.c:5:12: error: expected declaration specifiers or '...' before '&' token
5 | scanf("%d",&b);
| ^
main.c:6:1: warning: data definition has no type or storage class
6 | c=a+b;
| ^
main.c:6:1: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c:6:3: error: initializer element is not constant
6 | c=a+b;
| ^
main.c:8:1: warning: data definition has no type or storage class
8 | ans=(int)log10(c)+1;
| ^~~
main.c:8:1: error: type defaults to 'int' in declaration of 'ans' [-Wimplicit-int]
main.c:8:10: error: implicit declaration of function 'log10' [-Wimplicit-function-declaration]
8 | ans=(int)log10(c)+1;
| ^~~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'log10'
1 | #include <stdio.h>
+++ |+#include <math.h>
2 |
main.c:8:10: warning: incompatible implicit declaration of built-in function 'log10' [-Wbuiltin-declaration-mismatch]
8 | ans=(int)log10(c)+1;
| ^~~~~
main.c:8:10: note: include '<math.h>' or provide a declaration of 'log10'
main.c:8:5: error: initializer element is not constant
8 | ans=(int)log10(c)+1;
| ^
main.c:9:8: error: expected declaration specifiers or '...' before string constant
9 | printf("%d",ans);
| ^~~~
main.c:9:13: error: expected declaration specifiers or '...' before 'ans'
9 | printf("%d",ans);
| ^~~
main.c:10:1: error: expected identifier or '(' before '}' token
10 | }
| ^
|
s963973231
|
p00002
|
C
|
#include <stdio.h>
#include <math.h>
main(){
long a,b,c,ans;
scanf("%d",&a);
scanf("%d",&b);
c=a+b;
ans=(long)log10(c)+1;
printf("%d",ans);
}#include <stdio.h>
#include <math.h>
main(){
long a,b,c,ans;
scanf("%d",&a);
scanf("%d",&b);
c=a+b;
ans=(long)log10(c)+1;
printf("%d",ans);
return 0;
}
|
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(){
| ^~~~
main.c:11:2: error: stray '#' in program
11 | }#include <stdio.h>
| ^
main.c:11:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
11 | }#include <stdio.h>
| ^
|
s807102988
|
p00002
|
C
|
#include <stdio.h>
int main(void)
{
/* ?????°?????£?¨? */
int number1,number2;
int digit = 0;
/* ??°????????\??? */
c=number1+number2;
scanf("%d", &number);
/* ?????°????¨???? */
while(c!=0){
c = c / 10;
++digit;
}
/* ??°???????????°?????¨??? */
printf(" %d\n", digit);
return 0;
}
|
main.c: In function 'main':
main.c:28:1: error: 'c' undeclared (first use in this function)
28 | c=number1+number2;
| ^
main.c:28:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:32:16: error: 'number' undeclared (first use in this function); did you mean 'number2'?
32 | scanf("%d", &number);
| ^~~~~~
| number2
|
s414511338
|
p00002
|
C
|
#include <stdio.h>
#include <conio.h>
int main(void)
{
int count = 0;
int i;
long num;
char str[20],str1[200][15], str2[200][15];
char *p;
for(i=0; i<200; i++){
scanf("%s %s", &str1[i], &str2[i]);
//gets(str1[i]);
if( *str1[i]=='\0' || *str1[i]=='\n') break;
num = atoi(str1[i])+atoi(str2[i]);
itoa(num, str, 10);
//printf("%ld\n", num);
//printf("str %s\n", str);
count = 0;
p = str;
while(*p!='\0'){
p++;
count++;
}
printf("%d\n",count);
}
return 0;
}
|
main.c:2:10: fatal error: conio.h: No such file or directory
2 | #include <conio.h>
| ^~~~~~~~~
compilation terminated.
|
s745179677
|
p00002
|
C
|
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int count = 0;
int i;
long num;
char str[20],str1[200][15], str2[200][15];
char *p;
for(i=0; i<200; i++){
scanf("%s %s", &str1[i], &str2[i]);
//gets(str1[i]);
if( *str1[i]=='\0' || *str1[i]=='\n') break;
num = atoi(str1[i])+atoi(str2[i]);
itoa(num, str, 10);
//printf("%ld\n", num);
//printf("str %s\n", str);
count = 0;
p = str;
while(*p!='\0'){
p++;
count++;
}
printf("%d\n",count);
}
return 0;
}
|
main.c: In function 'main':
main.c:18:17: error: implicit declaration of function 'itoa' [-Wimplicit-function-declaration]
18 | itoa(num, str, 10);
| ^~~~
|
s843050473
|
p00002
|
C
|
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int count = 0;
int i;
long num;
char str[20],str1[200][15], str2[200][15];
char *p;
for(i=0; i<200; i++){
scanf("%s %s", &str1[i], &str2[i]);
//gets(str1[i]);
if( *str1[i]=='\0' || *str1[i]=='\n') break;
num = atol(str1[i])+atol(str2[i]);
itoa(num, str, 10);
//printf("%ld\n", num);
//printf("str %s\n", str);
count = 0;
p = str;
while(*p!='\0'){
p++;
count++;
}
printf("%d\n",count);
}
return 0;
}
|
main.c: In function 'main':
main.c:18:17: error: implicit declaration of function 'itoa' [-Wimplicit-function-declaration]
18 | itoa(num, str, 10);
| ^~~~
|
s312915165
|
p00002
|
C
|
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int count = 0;
int i;
long num;
char str[20],str1[200][15], str2[200][15];
char *p;
for(i=0; i<200; i++){
scanf("%s %s", &str1[i], &str2[i]);
//gets(str1[i]);
if( *str1[i]=='\0' || *str1[i]=='\n') break;
num = atol(str1[i])+atol(str2[i]);
ltoa(num, str, 10);
//printf("%ld\n", num);
//printf("str %s\n", str);
count = 0;
p = str;
while(*p!='\0'){
p++;
count++;
}
printf("%d\n",count);
}
return 0;
}
|
main.c: In function 'main':
main.c:18:17: error: implicit declaration of function 'ltoa' [-Wimplicit-function-declaration]
18 | ltoa(num, str, 10);
| ^~~~
|
s342219559
|
p00002
|
C
|
#include <stdio.h>
struct dataset{
int a, b;
int num_digits;
};
int main(){
dataset data[200];
int i, j, sum;
i = 0;
do{
if(scanf("%d %d", &data[i].a, &data[i].b) == EOF) break;
else i += 1;
sum = data[i-1].a + data[i-1].b;
data[i-1].num_digits = 0;
do{
data[i-1].num_digits += 1;
sum /= 10;
}while(sum != 0);
}while(i < 200);
for(j = 0; j < i; j++) printf("%d\n", data[j].num_digits);
return 0;
}
|
main.c: In function 'main':
main.c:9:9: error: unknown type name 'dataset'; use 'struct' keyword to refer to the type
9 | dataset data[200];
| ^~~~~~~
| struct
main.c:14:43: error: request for member 'a' in something not a structure or union
14 | if(scanf("%d %d", &data[i].a, &data[i].b) == EOF) break;
| ^
main.c:14:55: error: request for member 'b' in something not a structure or union
14 | if(scanf("%d %d", &data[i].a, &data[i].b) == EOF) break;
| ^
main.c:17:32: error: request for member 'a' in something not a structure or union
17 | sum = data[i-1].a + data[i-1].b;
| ^
main.c:17:46: error: request for member 'b' in something not a structure or union
17 | sum = data[i-1].a + data[i-1].b;
| ^
main.c:18:26: error: request for member 'num_digits' in something not a structure or union
18 | data[i-1].num_digits = 0;
| ^
main.c:20:34: error: request for member 'num_digits' in something not a structure or union
20 | data[i-1].num_digits += 1;
| ^
main.c:25:54: error: request for member 'num_digits' in something not a structure or union
25 | for(j = 0; j < i; j++) printf("%d\n", data[j].num_digits);
| ^
|
s696743807
|
p00002
|
C
|
#include<stdio.h>
main () {
int i;
int j;
unsigned long a,b,total;
while(scanf("%d %d",&a,&b) Q= EOF) {
total = a + b;
i = 0;
while(total >= 10) {
total /= 10;
i++;
}
i++;
printf("%d\n",i);
}
return 0;
}
|
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main () {
| ^~~~
main.c: In function 'main':
main.c:6:35: error: expected ')' before 'Q'
6 | while(scanf("%d %d",&a,&b) Q= EOF) {
| ~ ^~
| )
|
s463598356
|
p00002
|
C
|
#include<stdio.h>
int main(){
int i,j,count=0,sum;
int a[3],b[3];
while(1){
if(scanf("%d %d",a[i],b[i]) == EOF){break;}
i++
}
for(j = 0;j<i;j++){
sum = a[j]+b[j];
while(sum >0){
sum/=10;
count++;
}printf("%d\n",count);
count = 0;
}
}
|
main.c: In function 'main':
main.c:8:4: error: expected ';' before '}' token
8 | i++
| ^
| ;
9 | }
| ~
|
s759446060
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int a, b;
int count = 0;
scanf("%d", &a); scanf("%d", &b);
sum = a + b;
do{
sum /= 10;
count++;
}while(sum);
printf("%d\n", count);
}
|
main.c: In function 'main':
main.c:7:5: error: 'sum' undeclared (first use in this function)
7 | sum = a + b;
| ^~~
main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
|
s600983076
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int a, b;
int count = 0;
scanf("%d", &a); scanf("%d", &b);
sum = a + b;
do{
sum /= 10;
count++;
}while(sum);
printf("%d\n", count);
return 0
}
|
main.c: In function 'main':
main.c:7:5: error: 'sum' undeclared (first use in this function)
7 | sum = a + b;
| ^~~
main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:13: error: expected ';' before '}' token
14 | return 0
| ^
| ;
15 | }
| ~
|
s207778586
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b,c,n=0;
scanf("%d",&a);
scanf("%d",&b);
c=a+b;
while(true){
if(c<1){
break;
}
c=c/10;
n=n+1;
}
printf("%d\n",n);
return 0;
}
|
main.c: In function 'main':
main.c:7:15: error: 'true' undeclared (first use in this function)
7 | while(true){
| ^~~~
main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include<stdio.h>
+++ |+#include <stdbool.h>
2 | int main(){
main.c:7:15: note: each undeclared identifier is reported only once for each function it appears in
7 | while(true){
| ^~~~
|
s928734074
|
p00002
|
C
|
#include<stdio.h>
int main(void)
{
int a, b, c, d=0, e=10,f=0;
while(scanf("%d %d", &a, &b)!=EOF){
c=a+b;
while(1){
d=c/e;
f++;
e=e*10;
if(d==0)break;
}
printf("%d\n",f);
f=0;
e=10;
d=0;
}
|
main.c: In function 'main':
main.c:22:3: error: expected declaration or statement at end of input
22 | }
| ^
|
s860226423
|
p00002
|
C
|
#include <stdio.h>
int main(){
int a,b,c,d,i;
int count;
int max_data = 200;
for(i=1;i<=max_data;i++){
a=-1;
b=-1;
count=0;
scanf("%d %d",&a,&b);
if(a<0||b<0){
break;
}
c=a+b;
d=(int)log10(double)c) + 1;
printf("%d\n",d);
}
}
|
main.c: In function 'main':
main.c:18:16: error: implicit declaration of function 'log10' [-Wimplicit-function-declaration]
18 | d=(int)log10(double)c) + 1;
| ^~~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'log10'
1 | #include <stdio.h>
+++ |+#include <math.h>
2 |
main.c:18:16: warning: incompatible implicit declaration of built-in function 'log10' [-Wbuiltin-declaration-mismatch]
18 | d=(int)log10(double)c) + 1;
| ^~~~~
main.c:18:16: note: include '<math.h>' or provide a declaration of 'log10'
main.c:18:22: error: expected expression before 'double'
18 | d=(int)log10(double)c) + 1;
| ^~~~~~
main.c:18:29: error: expected ';' before 'c'
18 | d=(int)log10(double)c) + 1;
| ^
| ;
main.c:18:30: error: expected statement before ')' token
18 | d=(int)log10(double)c) + 1;
| ^
|
s672176609
|
p00002
|
C
|
#include<stdio.h>
int main(void){
int x,y;
While(scanf("%d%d",&x,&y)!=EOF){
x=x+y;
y=0;
for(;x>0;x/=10){
y++;
}
printf("%d\n",y);
}
return 0;
}
|
main.c: In function 'main':
main.c:4:1: error: implicit declaration of function 'While' [-Wimplicit-function-declaration]
4 | While(scanf("%d%d",&x,&y)!=EOF){
| ^~~~~
main.c:4:32: error: expected ';' before '{' token
4 | While(scanf("%d%d",&x,&y)!=EOF){
| ^
| ;
|
s062887299
|
p00002
|
C
|
#include<stdio.h>
int main()
{
int a,b,ans;
int digit = 0;
scanf("%d %d\n",&a,&b)
ans = a + b;
while(ans!=0){
ans = ans / 10;
++digit;
}
printf("%d\n",digit);
return 0;
}
|
main.c: In function 'main':
main.c:7:25: error: expected ';' before 'ans'
7 | scanf("%d %d\n",&a,&b)
| ^
| ;
8 | ans = a + b;
| ~~~
|
s475207689
|
p00002
|
C
|
#include<stdio.h>
int main()
{
int a,b;
int ans = 0;
int digit = 0;
scanf("%d %d\n",&a,&b)
ans = a + b;
while(ans!=0){
ans = ans / 10;
++digit;
}
printf("%d\n",digit);
return 0;
}
|
main.c: In function 'main':
main.c:8:25: error: expected ';' before 'ans'
8 | scanf("%d %d\n",&a,&b)
| ^
| ;
9 | ans = a + b;
| ~~~
|
s394809406
|
p00002
|
C
|
#include<stdio.h>
int main()
{
int a,b;
int c = 0;
int digit = 0;
scanf("%d %d\n",&a,&b)
c = a + b;
while(ans!=0){
ans = ans / 10;
++digit;
}
printf("%d\n",digit);
return 0;
}
|
main.c: In function 'main':
main.c:8:25: error: expected ';' before 'c'
8 | scanf("%d %d\n",&a,&b)
| ^
| ;
9 | c = a + b;
| ~
main.c:10:9: error: 'ans' undeclared (first use in this function)
10 | while(ans!=0){
| ^~~
main.c:10:9: note: each undeclared identifier is reported only once for each function it appears in
|
s707358047
|
p00002
|
C
|
#include<stdio.h>
int main()
{
int a,b;
int ans = 0;
int digit = 0;
scanf("%d %d\n",&a,&b)
ans = a + b;
while(ans!=0){
ans = ans / 10;
++digit;
}
printf("%d\n",digit);
return 0;
}
|
main.c: In function 'main':
main.c:8:25: error: expected ';' before 'ans'
8 | scanf("%d %d\n",&a,&b)
| ^
| ;
9 | ans = a + b;
| ~~~
|
s318330035
|
p00002
|
C
|
#include<stdio.h>
int main()
{
int a,b,i;
int ans = 0;
int digit = 0;
for(i=0;i<3;i++{
scanf("%d %d\n",&a,&b);
ans = a + b;
while(ans!=0){
ans = ans / 10;
digit++;
}
printf("%d\n",digit);
}
return 0;
}
|
main.c: In function 'main':
main.c:8:18: error: expected ')' before '{' token
8 | for(i=0;i<3;i++{
| ~ ^
| )
main.c:18:1: error: expected expression before '}' token
18 | }
| ^
|
s881260598
|
p00002
|
C
|
#include<stdio.h>
int main()
{
int a,b,i;
int ans[2] = 0;
int digit[2] = 0;
for(i=0;i<3;i++){
scanf("%d %d\n",&a,&b);
ans[i] = a + b;
}
for(i=0;i<3;i++){
while(ans[i]!=0){
ans[i] = ans[i] / 10;
digit[i]++;
}
printf("%d\n",digit[i]);
}
return 0;
}
|
main.c: In function 'main':
main.c:6:16: error: invalid initializer
6 | int ans[2] = 0;
| ^
main.c:7:18: error: invalid initializer
7 | int digit[2] = 0;
| ^
|
s198576559
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b,sum,i;
while(scant("%d %d",&a,&b)!=EOF){
sum=a+b;
for(i=0;sum!=0;i++){
sum=sum/10;
}
printf("%d",i);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:11: error: implicit declaration of function 'scant'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | while(scant("%d %d",&a,&b)!=EOF){
| ^~~~~
| scanf
|
s591372265
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b,sum,i;
while(scant("%d %d",&a,&b)!=EOF){
sum=a+b;
for(i=0;sum!=0;i++){
sum=sum/10;
}
printf("%d\n",i);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:11: error: implicit declaration of function 'scant'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | while(scant("%d %d",&a,&b)!=EOF){
| ^~~~~
| scanf
|
s223797328
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b,sum,i;
while(scant("%d %d",a,b)!=-1){
sum=a+b;
for(i=0;sum!=0;i++){
sum=sum/10;
}
printf("%d\n",i);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:11: error: implicit declaration of function 'scant'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | while(scant("%d %d",a,b)!=-1){
| ^~~~~
| scanf
|
s197275318
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b,sum,i;
while(scant("%d %d",a,b)!=-1){
sum=a+b;
for(i=0;sum!=0;i++){
sum=sum/10;
}
printf("%d\n",i);
}
return 0;
}
|
main.c: In function 'main':
main.c:5:11: error: implicit declaration of function 'scant'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | while(scant("%d %d",a,b)!=-1){
| ^~~~~
| scanf
|
s196728433
|
p00002
|
C
|
#include<stdio.h>
int main()
{
int a,b,i;
int ans;
int digit;
for(i=0;i<3;i++){
ans = 0;
digit = 0;
scanf("%d %d\n",&a,&b);
ans = a + b;
digit = (int)log10((double)ans[i]) + 1;
printf("%d\n",digit);
}
return 0;
}
|
main.c: In function 'main':
main.c:13:18: error: implicit declaration of function 'log10' [-Wimplicit-function-declaration]
13 | digit = (int)log10((double)ans[i]) + 1;
| ^~~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'log10'
1 | #include<stdio.h>
+++ |+#include <math.h>
2 |
main.c:13:18: warning: incompatible implicit declaration of built-in function 'log10' [-Wbuiltin-declaration-mismatch]
13 | digit = (int)log10((double)ans[i]) + 1;
| ^~~~~
main.c:13:18: note: include '<math.h>' or provide a declaration of 'log10'
main.c:13:35: error: subscripted value is neither array nor pointer nor vector
13 | digit = (int)log10((double)ans[i]) + 1;
| ^
|
s890877306
|
p00002
|
C
|
#include<stdio.h>
int main()
{
int a,b,i;
int ans;
int digit;
for(i=0;i<3;i++){
ans = 0;
digit = 0;
scanf("%d %d\n",&a,&b);
ans = a + b;
digit = (int)log10((double)ans[i]) + 1;
printf("%d\n",digit);
}
return 0;
}
|
main.c: In function 'main':
main.c:13:18: error: implicit declaration of function 'log10' [-Wimplicit-function-declaration]
13 | digit = (int)log10((double)ans[i]) + 1;
| ^~~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'log10'
1 | #include<stdio.h>
+++ |+#include <math.h>
2 |
main.c:13:18: warning: incompatible implicit declaration of built-in function 'log10' [-Wbuiltin-declaration-mismatch]
13 | digit = (int)log10((double)ans[i]) + 1;
| ^~~~~
main.c:13:18: note: include '<math.h>' or provide a declaration of 'log10'
main.c:13:35: error: subscripted value is neither array nor pointer nor vector
13 | digit = (int)log10((double)ans[i]) + 1;
| ^
|
s621655466
|
p00002
|
C
|
#include <stdio.h>
int main(void){
int a,b,c,s
while(scanf("%d %d",&a,&b) != EOF){
s = a+b;
c = 0;
if(s!=0){
while(s>0){
s /= 10;
c ++;
}
printf("%d\n",c);
}else{
printf("%d\n",1);
}
}
return 0;
}
|
main.c: In function 'main':
main.c:5:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'while'
5 | while(scanf("%d %d",&a,&b) != EOF){
| ^~~~~
|
s780793429
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b,c;
scanf("%d %d,&a,&b);
c = a + b;
if(c < 10)printf("1\n");
else if(10 <= c && c < 100)printf("2\n);
else if(100 <= c && c < 1000)printf("3\n");
else if(1000 <= c && c < 10000)printf("4\n");
else if(10000 <= c && c < 100000)priintf("5\n");
else if(100000 <= c && c < 1000000)printf("6\n");
else if(1000000 <= c)printf("7\n");
return 0;
}
|
main.c: In function 'main':
main.c:4:7: warning: missing terminating " character
4 | scanf("%d %d,&a,&b);
| ^
main.c:4:7: error: missing terminating " character
4 | scanf("%d %d,&a,&b);
| ^~~~~~~~~~~~~~
main.c:5:10: error: expected ')' before ';' token
5 | c = a + b;
| ^
| )
main.c:4:6: note: to match this '('
4 | scanf("%d %d,&a,&b);
| ^
main.c:8:35: warning: missing terminating " character
8 | else if(10 <= c && c < 100)printf("2\n);
| ^
main.c:8:35: error: missing terminating " character
8 | else if(10 <= c && c < 100)printf("2\n);
| ^~~~~~
main.c:5:3: error: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
5 | c = a + b;
| ~~^~~~~~~
| |
| int
In file included from main.c:1:
/usr/include/stdio.h:428:42: note: expected 'const char *' but argument is of type 'int'
428 | extern int scanf (const char *__restrict __format, ...) __wur;
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:15:1: error: expected declaration or statement at end of input
15 | }
| ^
|
s085233210
|
p00002
|
C
|
#include<stdio.h>
int main(){
int a,b,c;
scanf("%d %d",&a,&b);
c = a + b;
if(c < 10)printf("1\n");
else if(10 <= c && c < 100)printf("2\n);
else if(100 <= c && c < 1000)printf("3\n");
else if(1000 <= c && c < 10000)printf("4\n");
else if(10000 <= c && c < 100000)priintf("5\n");
else if(100000 <= c && c < 1000000)printf("6\n");
else if(1000000 <= c)printf("7\n");
return 0;
}
|
main.c: In function 'main':
main.c:8:35: warning: missing terminating " character
8 | else if(10 <= c && c < 100)printf("2\n);
| ^
main.c:8:35: error: missing terminating " character
8 | else if(10 <= c && c < 100)printf("2\n);
| ^~~~~~
main.c:9:1: error: expected expression before 'else'
9 | else if(100 <= c && c < 1000)printf("3\n");
| ^~~~
main.c:14:10: error: expected ';' before '}' token
14 | return 0;
| ^
| ;
15 | }
| ~
|
s298743385
|
p00002
|
C
|
safd
|
main.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
1 | safd
| ^~~~
|
s135151603
|
p00002
|
C
|
#include <stdio.h>
int main() {
int a, b, sum, i = 1;
scanf_s("%d %d", &a, &b);
sum = a + b;
while (sum / 10 != 0){
sum = sum / 10;
i++;
}
printf("%d\n", i);
return 0;
}
|
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | scanf_s("%d %d", &a, &b);
| ^~~~~~~
| scanf
|
s808052813
|
p00002
|
C
|
#include <stdio.h>
#include <string.h>
int main(){
int i,j;
char str[100];
while(scanf("%d %d",&i,&j) != EOF){
sptintf(str,"%d",a+b)
printf("%d\n",strlen(i+j));
}
return(0);
}
|
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'sptintf'; did you mean 'sprintf'? [-Wimplicit-function-declaration]
9 | sptintf(str,"%d",a+b)
| ^~~~~~~
| sprintf
main.c:9:26: error: 'a' undeclared (first use in this function)
9 | sptintf(str,"%d",a+b)
| ^
main.c:9:26: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:28: error: 'b' undeclared (first use in this function)
9 | sptintf(str,"%d",a+b)
| ^
main.c:9:30: error: expected ';' before 'printf'
9 | sptintf(str,"%d",a+b)
| ^
| ;
10 | printf("%d\n",strlen(i+j));
| ~~~~~~
|
s632885516
|
p00002
|
C
|
#include <stdio.h>
#include <string.h>
int main(){
int i,j;
char str[100];
while(scanf("%d %d",&i,&j) != EOF){
sptintf(str,"%d",i+j)
printf("%d\n",strlen(i+j));
}
return(0);
}
|
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'sptintf'; did you mean 'sprintf'? [-Wimplicit-function-declaration]
9 | sptintf(str,"%d",i+j)
| ^~~~~~~
| sprintf
main.c:9:30: error: expected ';' before 'printf'
9 | sptintf(str,"%d",i+j)
| ^
| ;
10 | printf("%d\n",strlen(i+j));
| ~~~~~~
|
s327654277
|
p00002
|
C
|
#include <stdio.h>
#include <string.h>
int main(){
int i,j;
char str[100];
while(scanf("%d %d",&i,&j) != EOF){
sptintf(str,"%d",i+j)
printf("%d\n",strlen(str));
}
return(0);
}
|
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'sptintf'; did you mean 'sprintf'? [-Wimplicit-function-declaration]
9 | sptintf(str,"%d",i+j)
| ^~~~~~~
| sprintf
main.c:9:30: error: expected ';' before 'printf'
9 | sptintf(str,"%d",i+j)
| ^
| ;
10 | printf("%d\n",strlen(str));
| ~~~~~~
|
s758439296
|
p00002
|
C
|
#include <stdio.h>
#include <string.h>
int main(){
int i,j;
char str[100];
while(scanf("%d %d",&i,&j) != EOF){
sptintf(str,"%d",i+j);
printf("%d\n",strlen(str));
}
return(0);
}
|
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'sptintf'; did you mean 'sprintf'? [-Wimplicit-function-declaration]
9 | sptintf(str,"%d",i+j);
| ^~~~~~~
| sprintf
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.