Borderou de evaluare (job #1287586)

Utilizator juniorOvidiu Rosca junior Data 7 decembrie 2014 21:17:23
Problema Sume 2 Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘unsigned int f_sume_mici(int)’: user.cpp:10:8: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wparentheses] if (s >= a[i]) // a[i] poate fi termen in sumele care se numara. ^ user.cpp: In function ‘int main()’: user.cpp:20:3: error: expected initializer before ‘unsigned’ unsigned int k; ^ user.cpp:23:23: error: ‘k’ was not declared in this scope scanf("%d %d", &n, &k); ^ user.cpp:30:8: error: ‘s’ was not declared in this scope for (s = 0, pas = 1 << 20; pas; pas >>= 1) ^ user.cpp:33:18: error: ‘s’ was not declared in this scope printf("%d\n", s + 1); ^ user.cpp:21:34: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("sume2.in", "r", stdin); ^ user.cpp:22:36: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("sume2.out", "w", stdout); ^ user.cpp:25:23: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d", a + i); ^

Ceva nu functioneaza?