#346
MaxAndAp
Să se scrie un program care citește un șir de n
numere naturale şi determină valoarea maximă din șir și de câte ori apare.
Problema | MaxAndAp | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #44423305 | Utilizator | |
Fișier | maxandap.cpp | Dimensiune | 599 B |
Data încărcării | 17 August 2023, 13:56 | Scor / rezultat | Eroare de compilare |
maxandap.cpp:1:9: error: #include expects "FILENAME" or <FILENAME> #include <iostream> ^ maxandap.cpp:3:1: error: stray '\302' in program using namespace std; ^ maxandap.cpp:3:1: error: stray '\240' in program maxandap.cpp:3:1: error: stray '\302' in program maxandap.cpp:3:1: error: stray '\240' in program maxandap.cpp:5:1: error: stray '\302' in program int main() ^ maxandap.cpp:5:1: error: stray '\240' in program maxandap.cpp:7:1: error: stray '\302' in program int n,i, max = 0, ap = 0, x; ^ maxandap.cpp:7:1: error: stray '\240' in program maxandap.cpp:7:1: error: stray '\302' in program maxandap.cpp:7:1: error: stray '\240' in program maxandap.cpp:7:1: error: stray '\302' in program maxandap.cpp:7:1: error: stray '\240' in program maxandap.cpp:7:1: error: stray '\302' in program maxandap.cpp:7:1: error: stray '\240' in program maxandap.cpp:7:1: error: stray '\302' in program maxandap.cpp:7:1: error: stray '\240' in program maxandap.cpp:7:1: error: stray '\302' in program maxandap.cpp:7:1: error: stray '\240' in program maxandap.cpp:7:1: error: stray '\302' in program maxandap.cpp:7:1: error: stray '\240' in program maxandap.cpp:7:1: error: stray '\302' in program maxandap.cpp:7:1: error: stray '\240' in program maxandap.cpp:7:1: error: stray '\302' in program maxandap.cpp:7:1: error: stray '\240' in program maxandap.cpp:7:1: error: stray '\302' in program maxandap.cpp:7:1: error: stray '\240' in program maxandap.cpp:7:1: error: stray '\302' in program maxandap.cpp:7:1: error: stray '\240' in program maxandap.cpp:7:1: error: stray '\302' in program maxandap.cpp:7:1: error: stray '\240' in program maxandap.cpp:7:1: error: stray '\302' in program maxandap.cpp:7:1: error: stray '\240' in program maxandap.cpp:7:1: error: stray '\302' in program maxandap.cpp:7:1: error: stray '\240' in program maxandap.cpp:9:1: error: stray '\302' in program cin >> n; ^ maxandap.cpp:9:1: error: stray '\240' in program maxandap.cpp:9:1: error: stray '\302' in program maxandap.cpp:9:1: error: stray '\240' in program maxandap.cpp:9:1: error: stray '\302' in program maxandap.cpp:9:1: error: stray '\240' in program maxandap.cpp:9:1: error: stray '\302' in program maxandap.cpp:9:1: error: stray '\240' in program maxandap.cpp:9:1: error: stray '\302' in program maxandap.cpp:9:1: error: stray '\240' in program maxandap.cpp:9:1: error: stray '\302' in program maxandap.cpp:9:1: error: stray '\240' in program maxandap.cpp:9:1: error: stray '\302' in program maxandap.cpp:9:1: error: stray '\240' in program maxandap.cpp:9:1: error: stray '\302' in program maxandap.cpp:9:1: error: stray '\240' in program maxandap.cpp:11:1: error: stray '\302' in program for ( i = 1; i <= n; i++) ^ maxandap.cpp:11:1: error: stray '\240' in program maxandap.cpp:11:1: error: stray '\302' in program maxandap.cpp:11:1: error: stray '\240' in program maxandap.cpp:11:1: error: stray '\302' in program maxandap.cpp:11:1: error: stray '\240' in program maxandap.cpp:11:1: error: stray '\302' in program maxandap.cpp:11:1: error: stray '\240' in program maxandap.cpp:11:1: error: stray '\302' in program maxandap.cpp:11:1: error: stray '\240' in program maxandap.cpp:11:1: error: stray '\302' in program maxandap.cpp:11:1: error: stray '\240' in program maxandap.cpp:11:1: error: stray '\302' in program maxandap.cpp:11:1: error: stray '\240' in program maxandap.cpp:11:1: error: stray '\302' in program maxandap.cpp:11:1: error: stray '\240' in program maxandap.cpp:11:1: error: stray '\302' in program maxandap.cpp:11:1: error: stray '\240' in program maxandap.cpp:11:1: error: stray '\302' in program maxandap.cpp:11:1: error: stray '\240' in program maxandap.cpp:11:1: error: stray '\302' in program maxandap.cpp:11:1: error: stray '\240' in program maxandap.cpp:11:1: error: stray '\302' in program maxandap.cpp:11:1: error: stray '\240' in program maxandap.cpp:11:1: error: stray '\302' in program maxandap.cpp:11:1: error: stray '\240' in program maxandap.cpp:11:1: error: stray '\302' in program maxandap.cpp:11:1: error: stray '\240' in program maxandap.cpp:12:1: error: stray '\302' in program { ^ maxandap.cpp:12:1: error: stray '\240' in program maxandap.cpp:12:1: error: stray '\302' in program maxandap.cpp:12:1: error: stray '\240' in program maxandap.cpp:12:1: error: stray '\302' in program maxandap.cpp:12:1: error: stray '\240' in program maxandap.cpp:12:1: error: stray '\302' in program maxandap.cpp:12:1: error: stray '\240' in program maxandap.cpp:12:1: error: stray '\302' in program maxandap.cpp:12:1: error: stray '\240' in program maxandap.cpp:12:1: error: stray '\302' in program maxandap.cpp:12:1: error: stray '\240' in program maxandap.cpp:13:1: error: stray '\302' in program cin >> x; ^ maxandap.cpp:13:1: error: stray '\240' in program maxandap.cpp:13:1: error: stray '\302' in program maxandap.cpp:13:1: error: stray '\240' in program maxandap.cpp:13:1: error: stray '\302' in program maxandap.cpp:13:1: error: stray '\240' in program maxandap.cpp:13:1: error: stray '\302' in program maxandap.cpp:13:1: error: stray '\240' in program maxandap.cpp:13:1: error: stray '\302' in program maxandap.cpp:13:1: error: stray '\240' in program maxandap.cpp:13:1: error: stray '\302' in program maxandap.cpp:13:1: error: stray '\240' in program maxandap.cpp:13:1: error: stray '\302' in program maxandap.cpp:13:1: error: stray '\240' in program maxandap.cpp:13:1: error: stray '\302' in program maxandap.cpp:13:1: error: stray '\240' in program maxandap.cpp:13:1: error: stray '\302' in program maxandap.cpp:13:1: error: stray '\240' in program maxandap.cpp:13:1: error: stray '\302' in program maxandap.cpp:13:1: error: stray '\240' in program maxandap.cpp:13:1: error: stray '\302' in program maxandap.cpp:13:1: error: stray '\240' in program maxandap.cpp:13:1: error: stray '\302' in program maxandap.cpp:13:1: error: stray '\240' in program maxandap.cpp:15:1: error: stray '\302' in program if (x > max) ^ maxandap.cpp:15:1: error: stray '\240' in program maxandap.cpp:15:1: error: stray '\302' in program maxandap.cpp:15:1: error: stray '\240' in program maxandap.cpp:15:1: error: stray '\302' in program maxandap.cpp:15:1: error: stray '\240' in program maxandap.cpp:15:1: error: stray '\302' in program maxandap.cpp:15:1: error: stray '\240' in program maxandap.cpp:15:1: error: stray '\302' in program maxandap.cpp:15:1: error: stray '\240' in program maxandap.cpp:15:1: error: stray '\302' in program maxandap.cpp:15:1: error: stray '\240' in program maxandap.cpp:15:1: error: stray '\302' in program maxandap.cpp:15:1: error: stray '\240' in program maxandap.cpp:15:1: error: stray '\302' in program maxandap.cpp:15:1: error: stray '\240' in program maxandap.cpp:15:1: error: stray '\302' in program maxandap.cpp:15:1: error: stray '\240' in program maxandap.cpp:15:1: error: stray '\302' in program maxandap.cpp:15:1: error: stray '\240' in program maxandap.cpp:15:1: error: stray '\302' in program maxandap.cpp:15:1: error: stray '\240' in program maxandap.cpp:15:1: error: stray '\302' in program maxandap.cpp:15:1: error: stray '\240' in program maxandap.cpp:16:1: error: stray '\302' in program ^ maxandap.cpp:16:1: error: stray '\240' in program maxandap.cpp:16:1: error: stray '\302' in program maxandap.cpp:16:1: error: stray '\240' in program maxandap.cpp:16:1: error: stray '\302' in program maxandap.cpp:16:1: error: stray '\240' in program maxandap.cpp:16:1: error: stray '\302' in program maxandap.cpp:16:1: error: stray '\240' in program maxandap.cpp:16:1: error: stray '\302' in program maxandap.cpp:16:1: error: stray '\240' in program maxandap.cpp:16:1: error: stray '\302' in program maxandap.cpp:16:1: error: stray '\240' in program maxandap.cpp:16:1: error: stray '\302' in program maxandap.cpp:16:1: error: stray '\240' in program maxandap.cpp:16:1: error: stray '\302' in program maxandap.cpp:16:1: error: stray '\240' in program maxandap.cpp:16:1: error: stray '\302' in program maxandap.cpp:16:1: error: stray '\240' in program maxandap.cpp:17:23: error: stray '\302' in program max = x;} ^ maxandap.cpp:17:23: error: stray '\240' in program maxandap.cpp:17:23: error: stray '\302' in program maxandap.cpp:17:23: error: stray '\240' in program maxandap.cpp:18:6: error: stray '\302' in program for ( i = 1; i <= n; i++) ^ maxandap.cpp:18:6: error: stray '\240' in program maxandap.cpp:18:6: error: stray '\302' in program maxandap.cpp:18:6: error: stray '\240' in program maxandap.cpp:18:6: error: stray '\302' in program maxandap.cpp:18:6: error: stray '\240' in program maxandap.cpp:18:6: error: stray '\302' in program maxandap.cpp:18:6: error: stray '\240' in program maxandap.cpp:18:6: error: stray '\302' in program maxandap.cpp:18:6: error: stray '\240' in program maxandap.cpp:18:6: error: stray '\302' in program maxandap.cpp:18:6: error: stray '\240' in program maxandap.cpp:18:6: error: stray '\302' in program maxandap.cpp:18:6: error: stray '\240' in program maxandap.cpp:18:6: error: stray '\302' in program maxandap.cpp:18:6: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program ^ maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:21:1: error: stray '\302' in program maxandap.cpp:21:1: error: stray '\240' in program maxandap.cpp:22:1: error: stray '\302' in program cout << max << " " << ap; ^ maxandap.cpp:22:1: error: stray '\240' in program maxandap.cpp:22:1: error: stray '\302' in program maxandap.cpp:22:1: error: stray '\240' in program maxandap.cpp:22:1: error: stray '\302' in program maxandap.cpp:22:1: error: stray '\240' in program maxandap.cpp:22:1: error: stray '\302' in program maxandap.cpp:22:1: error: stray '\240' in program maxandap.cpp:22:1: error: stray '\302' in program maxandap.cpp:22:1: error: stray '\240' in program maxandap.cpp:22:1: error: stray '\302' in program maxandap.cpp:22:1: error: stray '\240' in program maxandap.cpp:22:1: error: stray '\302' in program maxandap.cpp:22:1: error: stray '\240' in program maxandap.cpp:22:1: error: stray '\302' in program maxandap.cpp:22:1: error: stray '\240' in program maxandap.cpp:22:1: error: stray '\302' in program maxandap.cpp:22:1: error: stray '\240' in program maxandap.cpp:22:1: error: stray '\302' in program maxandap.cpp:22:1: error: stray '\240' in program maxandap.cpp:22:1: error: stray '\302' in program maxandap.cpp:22:1: error: stray '\240' in program maxandap.cpp:22:1: error: stray '\302' in program maxandap.cpp:22:1: error: stray '\240' in program maxandap.cpp:23:1: error: stray '\302' in program return 0; ^ maxandap.cpp:23:1: error: stray '\240' in program maxandap.cpp:23:1: error: stray '\302' in program maxandap.cpp:23:1: error: stray '\240' in program maxandap.cpp:23:1: error: stray '\302' in program maxandap.cpp:23:1: error: stray '\240' in program maxandap.cpp:23:1: error: stray '\302' in program maxandap.cpp:23:1: error: stray '\240' in program maxandap.cpp:23:1: error: stray '\302' in program maxandap.cpp:23:1: error: stray '\240' in program maxandap.cpp: In function 'int main()': maxandap.cpp:9:18: error: 'cin' was not declared in this scope cin >> n; ^ maxandap.cpp:20:10: error: 'app' was not declared in this scope app++;} ^ maxandap.cpp:22:18: error: 'cout' was not declared in this scope cout << max << " " << ap; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MaxAndAp 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ă.