#2750
GenNr
C++
Se citesc două numere naturale. Să se afișeze cel mai mic și cel mai mare număr format din exact două cifre, scris cu o cifră din primul număr și cu o cifră din cel de-al doilea.
Problema | GenNr | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #35979115 | Utilizator | |
Fișier | gennr.cpp | Dimensiune | 601 B |
Data încărcării | 30 Martie 2022, 11:59 | Scor / rezultat | Eroare de compilare |
gennr.cpp: In function 'int main()': gennr.cpp:5:28: error: expected initializer before 'max2' {int a,b, min1, min2, max1 max2, c,d; ^ gennr.cpp:17:2: error: 'max1' was not declared in this scope max1=a%10; ^ gennr.cpp:22:3: error: 'max2' was not declared in this scope max2=b%10; ^ gennr.cpp:27:17: error: 'c' was not declared in this scope if (min1<min2) c=10*min1+min2; ^ gennr.cpp:28:7: error: 'c' was not declared in this scope else c=10*min2+min1; ^ gennr.cpp:29:10: error: 'c' was not declared in this scope cout << c; ^ gennr.cpp:30:17: error: 'd' was not declared in this scope if (max1<max2) d=10*max1+max2; ^ gennr.cpp:31:7: error: 'd' was not declared in this scope else d=10*max2+max1; ^ gennr.cpp:32:10: error: 'd' was not declared in this scope cout << d; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GenNr 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ă.