#1582
max_min
Se citesc de la tastatură n
numere naturale. Să se determine numărul a cărui sumă a cifrelor este cea mai mare, respective cea mai mică.
Problema | max_min | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #10136482 | Utilizator | |
Fișier | max_min.cpp | Dimensiune | 369 B |
Data încărcării | 13 August 2018, 19:06 | Scor / rezultat | Eroare de compilare |
max_min.cpp:1:21: warning: extra tokens at end of #include directive [enabled by default] #include <iostream> using namespace std; ^ max_min.cpp:2:1: error: stray '\302' in program int n,x,Min=1000,Max,i,s,y,Maxx,Minn; ^ max_min.cpp:2:1: error: stray '\240' in program max_min.cpp:4:1: error: stray '\302' in program { ^ max_min.cpp:4:1: error: stray '\240' in program max_min.cpp:7:2: error: stray '\302' in program { cin>>x; ^ max_min.cpp:7:2: error: stray '\240' in program max_min.cpp:8:1: error: stray '\302' in program s=0; ^ max_min.cpp:8:1: error: stray '\240' in program max_min.cpp:9:1: error: stray '\302' in program y=x; ^ max_min.cpp:9:1: error: stray '\240' in program max_min.cpp:11:1: error: stray '\302' in program { ^ max_min.cpp:11:1: error: stray '\240' in program max_min.cpp:14:1: error: stray '\302' in program if (s>Max) ^ max_min.cpp:14:1: error: stray '\240' in program max_min.cpp:16:1: error: stray '\302' in program else ^ max_min.cpp:16:1: error: stray '\240' in program max_min.cpp: In function 'int main()': max_min.cpp:5:5: error: 'cin' was not declared in this scope cin>>n; ^ max_min.cpp:5:5: note: suggested alternative: In file included from max_min.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ max_min.cpp:19:2: error: 'cout' was not declared in this scope cout<<Minn<<endl<<Maxx; ^ max_min.cpp:19:2: note: suggested alternative: In file included from max_min.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ max_min.cpp:19:14: error: 'endl' was not declared in this scope cout<<Minn<<endl<<Maxx; ^ max_min.cpp:19:14: note: suggested alternative: In file included from /usr/include/c++/4.8/iostream:39:0, from max_min.cpp:1: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema max_min 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ă.