#812
GenMat19
Scrieţi un program care citeşte de la tastatură un număr natural n
şi construieşte în memorie o matrice cu n
linii şi n
coloane în care:
1
;[1, n]
;Variante Bacalaureat 2012
Problema | GenMat19 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54394676 | Utilizator | |
Fișier | genmat19.cpp | Dimensiune | 377 B |
Data încărcării | 27 Noiembrie 2024, 13:50 | Scor / rezultat | Eroare de compilare |
genmat19.cpp:4:4: error: expected unqualified-id before '[' token int[16][16],i,j,n; ^ genmat19.cpp: In function 'int main()': genmat19.cpp:7:10: error: 'n' was not declared in this scope cin>>n; ^ genmat19.cpp:8:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ genmat19.cpp:9:9: error: 'a' was not declared in this scope a[i][1]=1; ^ genmat19.cpp:10:9: error: 'j' was not declared in this scope for(j=1;j<=n;j++) ^ genmat19.cpp:11:5: error: 'a' was not declared in this scope a[n][j]=j; ^ genmat19.cpp:12:9: error: 'j' was not declared in this scope for(j=2;j<=n;j++) ^ genmat19.cpp:13:13: error: 'i' was not declared in this scope for(i=n-1;i>=1;i--) ^ genmat19.cpp:14:5: error: 'a' was not declared in this scope a[i][j]=a[i+1][j]+a[i][j-1]; ^ genmat19.cpp:15:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ genmat19.cpp:16:13: error: 'j' was not declared in this scope for(j=1;j<=n;j++) ^ genmat19.cpp:17:17: error: 'a' was not declared in this scope cout<<a[i][j]<<' '; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GenMat19 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ă.