#2694
MinMax2
Se dau 2
numere naturale cu exact 3
cifre fiecare, să se afișeze cel mai mare numar și cel mai mic numar scris cu o cifră din primul număr și cu o cifră din al doilea.
Problema | MinMax2 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #55098368 | Utilizator | |
Fișier | minmax2.cpp | Dimensiune | 786 B |
Data încărcării | 23 Decembrie 2024, 11:45 | Scor / rezultat | Eroare de compilare |
minmax2.cpp:3:9: error: expected initializer before 'u1' int a,b u1, u2, z1, z2, s1, s2, min1, min2, max1, max2, S1, S2; ^ minmax2.cpp: In function 'int main()': minmax2.cpp:6:13: error: 'b' was not declared in this scope cin>>a>>b; ^ minmax2.cpp:7:5: error: 'u1' was not declared in this scope u1=a%10; ^ minmax2.cpp:8:5: error: 'z1' was not declared in this scope z1=(a%100)/10; ^ minmax2.cpp:9:5: error: 's1' was not declared in this scope s1=a/100; ^ minmax2.cpp:10:5: error: 'u2' was not declared in this scope u2=b%10; ^ minmax2.cpp:11:5: error: 'z2' was not declared in this scope z2=(b%100)/10; ^ minmax2.cpp:12:5: error: 's2' was not declared in this scope s2=b/100; ^ minmax2.cpp:13:5: error: 'min1' was not declared in this scope min1=u1; ^ minmax2.cpp:18:5: error: 'min2' was not declared in this scope min2=u2; ^ minmax2.cpp:24:9: error: 'S1' was not declared in this scope S1=min1*10+min2; ^ minmax2.cpp:26:9: error: 'S1' was not declared in this scope S1=min2*10+min1; ^ minmax2.cpp:27:5: error: 'max1' was not declared in this scope max1=u1; ^ minmax2.cpp:32:5: error: 'max2' was not declared in this scope max2=u2; ^ minmax2.cpp:38:9: error: 'S2' was not declared in this scope S2=max1*10+max2; ^ minmax2.cpp:40:9: error: 'S2' was not declared in this scope S2=max2*10+max1; ^ minmax2.cpp:41:11: error: 'S2' was not declared in this scope cout<<S2<<" "<<S1; ^ minmax2.cpp:41:20: error: 'S1' was not declared in this scope cout<<S2<<" "<<S1; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MinMax2 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ă.