#2948
medie_patratica
Se dau n
numere naturale. Calculați media pătratică a celor n
numere citite cu 2
zecimale exacte.
Problema | medie_patratica | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53528543 | Utilizator | |
Fișier | medie_patratica.cpp | Dimensiune | 242 B |
Data încărcării | 04 Noiembrie 2024, 12:36 | Scor / rezultat | Eroare de compilare |
medie_patratica.cpp:1:9: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix] #include<bits/stdc++.h>\ ^ medie_patratica.cpp:2:1: warning: extra tokens at end of #include directive [enabled by default] using namespace std; ^ medie_patratica.cpp: In function 'int main()': medie_patratica.cpp:7:5: error: 'cin' was not declared in this scope cin>>n; ^ medie_patratica.cpp:7:5: note: suggested alternative: In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from medie_patratica.cpp:2: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ medie_patratica.cpp:15:5: error: 'cout' was not declared in this scope cout<<fixed<<setprecision(2)<<s; ^ medie_patratica.cpp:15:5: note: suggested alternative: In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from medie_patratica.cpp:2: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ medie_patratica.cpp:15:11: error: 'fixed' was not declared in this scope cout<<fixed<<setprecision(2)<<s; ^ medie_patratica.cpp:15:11: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:42:0, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/sstream:38, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from medie_patratica.cpp:2: /usr/include/c++/4.8/bits/ios_base.h:964:3: note: 'std::fixed' fixed(ios_base& __base) ^ medie_patratica.cpp:15:32: error: 'setprecision' was not declared in this scope cout<<fixed<<setprecision(2)<<s; ^ medie_patratica.cpp:15:32: note: suggested alternative: In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:71:0, from medie_patratica.cpp:2: /usr/include/c++/4.8/iomanip:192:3: note: 'std::setprecision' setprecision(int __n) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema medie_patratica 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ă.