#4920
Să se scrie un program care citește numărul natural n și care afișează puterile 11,22, ... nn.
| Problema | AfisarePuteri2 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #62764082 | Utilizator | |
| Fișier | afisareputeri2.cpp | Dimensiune | 3.40 KB |
| Data încărcării | 01 Februarie 2026, 21:49 | Scor/rezultat | 0 puncte |
afisareputeri2.cpp: In function 'int main()': afisareputeri2.cpp:15:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (i = 1) cout << 1 << " "; ^ afisareputeri2.cpp:16:19: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (i = 2) { ^ afisareputeri2.cpp:19:19: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (i = 3) { ^ afisareputeri2.cpp:22:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (i = 4) { ^ afisareputeri2.cpp:25:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (i = 5) { ^ afisareputeri2.cpp:28:17: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (i = 6) { ^ afisareputeri2.cpp:31:17: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (i = 7) { ^ afisareputeri2.cpp:34:15: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (i = 8) { ^ afisareputeri2.cpp:37:16: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (i = 9) { ^ afisareputeri2.cpp:40:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (i = 10){ ^ afisareputeri2.cpp:43:19: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (i = 11) { ^ afisareputeri2.cpp:46:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (i = 12) { ^ afisareputeri2.cpp:49:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (i = 13) { ^ afisareputeri2.cpp:52:19: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (i = 14) { ^ afisareputeri2.cpp:55:18: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (i = 15) { ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| 2 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| 3 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| 4 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema AfisarePuteri2 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ă.