#210
Chenar
Să se parcurgă în sensul acelor de ceasornic chenarul exterior al unei matrice pătratice.
Variante Bacalaureat 2009
Problema | Chenar | Operații I/O |
chenar.in /chenar.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #20963974 | Utilizator | |
Fișier | chenar.c | Dimensiune | 1.52 KB |
Data încărcării | 16 Februarie 2020, 13:28 | Scor / rezultat | Eroare de compilare |
chenar.c: In function 'main': chenar.c:27:5: error: 'for' loop initial declarations are only allowed in C99 mode for(int i=0;i<n;i++) ^ chenar.c:27:5: note: use option -std=c99 or -std=gnu99 to compile your code chenar.c:33:13: error: redefinition of 'i' for(int i=0;i<n;i++) ^ chenar.c:27:13: note: previous definition of 'i' was here for(int i=0;i<n;i++) ^ chenar.c:33:5: error: 'for' loop initial declarations are only allowed in C99 mode for(int i=0;i<n;i++) ^ chenar.c:35:9: error: 'for' loop initial declarations are only allowed in C99 mode for(int j=0;j<n;j++) ^ chenar.c:48:13: error: redefinition of 'i' for(int i=0; i<n; i++) ^ chenar.c:33:13: note: previous definition of 'i' was here for(int i=0;i<n;i++) ^ chenar.c:48:5: error: 'for' loop initial declarations are only allowed in C99 mode for(int i=0; i<n; i++) ^ chenar.c:50:9: error: 'for' loop initial declarations are only allowed in C99 mode for(int j=0; j<n; j++) ^ chenar.c:56:13: error: redefinition of 'i' for(int i=1; i<n; i++) ^ chenar.c:48:13: note: previous definition of 'i' was here for(int i=0; i<n; i++) ^ chenar.c:56:5: error: 'for' loop initial declarations are only allowed in C99 mode for(int i=1; i<n; i++) ^ chenar.c:58:9: error: 'for' loop initial declarations are only allowed in C99 mode for(int j=1; j<n; j++) ^ chenar.c:64:13: error: redefinition of 'i' for(int i=n-1; i>=0; i--) ^ chenar.c:56:13: note: previous definition of 'i' was here for(int i=1; i<n; i++) ^ chenar.c:64:5: error: 'for' loop initial declarations are only allowed in C99 mode for(int i=n-1; i>=0; i--) ^ chenar.c:66:9: error: 'for' loop initial declarations are only allowed in C99 mode for(int j=n-2; j>=0; j--) ^ chenar.c:73:13: error: redefinition of 'i' for(int i=n-2; i>=1; i--) ^ chenar.c:64:13: note: previous definition of 'i' was here for(int i=n-1; i>=0; i--) ^ chenar.c:73:5: error: 'for' loop initial declarations are only allowed in C99 mode for(int i=n-2; i>=1; i--) ^ chenar.c:75:9: error: 'for' loop initial declarations are only allowed in C99 mode for(int j=n-2; j>=1; j--) ^ chenar.c: In function 'citire': chenar.c:11:19: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result] fscanf(f,"%d",&a[i][j]); ^ chenar.c: In function 'main': chenar.c:25:11: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result] fscanf(f,"%d",&n); ^ chenar.c:32:11: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result] fscanf(f,"%c",&c); ^ chenar.c:37:19: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result] fscanf(f,"%d",&a[i][j]); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Chenar face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.