Borderou de evaluare (job #743331)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Monotonă (clasa a 5-a) | Compilator | c-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 8 nov. 2023 20:23:02 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c: In function 'main':
main.c:18:9: error: expected '}' before 'else'
18 | else{
| ^~~~
main.c:6:17: warning: unused variable 'fout' [-Wunused-variable]
6 | FILE *fin, *fout;
| ^~~~
main.c: At top level:
main.c:30:5: warning: data definition has no type or storage class
30 | fclose(fin);
| ^~~~~~
main.c:30:5: warning: type defaults to 'int' in declaration of 'fclose' [-Wimplicit-int]
main.c:30:5: warning: parameter names (without types) in function declaration
main.c:31:5: warning: data definition has no type or storage class
31 | fout = fopen( "monotona.out", "w" );
| ^~~~
main.c:31:5: warning: type defaults to 'int' in declaration of 'fout' [-Wimplicit-int]
main.c:31:12: warning: initialization of 'int' from 'FILE *' makes integer from pointer without a cast [-Wint-conversion]
31 | fout = fopen( "monotona.out", "w" );
| ^~~~~
main.c:31:12: error: initializer element is not constant
main.c:32:5: error: expected identifier or '(' before 'if'
32 | if ( dir < 2 )
| ^~
main.c:34:5: error: expected identifier or '(' before 'else'
34 | else
| ^~~~
main.c:36:5: warning: data definition has no type or storage class
36 | fclose(fout);
| ^~~~~~
main.c:36:5: warning: type defaults to 'int' in declaration of 'fclose' [-Wimplicit-int]
main.c:36:5: warning: parameter names (without types) in function declaration
main.c:37:5: error: expected identifier or '(' before 'return'
37 | return 0;
| ^~~~~~
main.c:38:1: error: expected identifier or '(' before '}' token
38 | }
| ^
main.c: In function 'main':
main.c:11:5: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]
11 | fscanf( fin, "%d%d", &n, &a );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:15:9: warning: ignoring return value of 'fscanf' declared with attribute 'warn_unused_result' [-Wunused-result]
15 | fscanf ( fin, "%d", &b );
| ^~~~~~~~~~~~~~~~~~~~~~~~