#4722
veselCifra
Dat un număr natural n
să se verifice dacă prima cifra este egal cu suma celorlalte cifre.
Concurs selectie clasa a 9-a Centru de Excelenta in Informatica - 2024 - Vaslui
Problema | veselCifra | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53154590 | Utilizator | |
Fișier | veselcifra.cpp | Dimensiune | 1.54 KB |
Data încărcării | 19 Octombrie 2024, 12:22 | Scor / rezultat | Eroare de compilare |
veselcifra.cpp:21:2: error: stray '#' in program }#include <iostream> ^ veselcifra.cpp:41:2: error: stray '#' in program }#include <iostream> ^ veselcifra.cpp:61:2: error: stray '#' in program }#include <iostream> ^ veselcifra.cpp:81:2: error: stray '#' in program }#include <iostream> ^ veselcifra.cpp: In function 'int main()': veselcifra.cpp:10:5: error: expected ';' before 'while' while(n>9) ^ veselcifra.cpp:18:9: error: expected ';' before 'else' else ^ veselcifra.cpp:7:22: warning: unused variable 'c' [-Wunused-variable] long long int n, c , s=0; ^ veselcifra.cpp: At global scope: veselcifra.cpp:21:3: error: 'include' does not name a type }#include <iostream> ^ veselcifra.cpp: In function 'int main()': veselcifra.cpp:25:5: error: redefinition of 'int main()' int main() ^ veselcifra.cpp:5:5: error: 'int main()' previously defined here int main() ^ veselcifra.cpp:30:5: error: expected ';' before 'while' while(n>9) ^ veselcifra.cpp:38:9: error: expected ';' before 'else' else ^ veselcifra.cpp:27:22: warning: unused variable 'c' [-Wunused-variable] long long int n, c , s=0; ^ veselcifra.cpp: At global scope: veselcifra.cpp:41:3: error: 'include' does not name a type }#include <iostream> ^ veselcifra.cpp: In function 'int main()': veselcifra.cpp:45:5: error: redefinition of 'int main()' int main() ^ veselcifra.cpp:5:5: error: 'int main()' previously defined here int main() ^ veselcifra.cpp:50:5: error: expected ';' before 'while' while(n>9) ^ veselcifra.cpp:58:9: error: expected ';' before 'else' else ^ veselcifra.cpp:47:22: warning: unused variable 'c' [-Wunused-variable] long long int n, c , s=0; ^ veselcifra.cpp: At global scope: veselcifra.cpp:61:3: error: 'include' does not name a type }#include <iostream> ^ veselcifra.cpp: In function 'int main()': veselcifra.cpp:65:5: error: redefinition of 'int main()' int main() ^ veselcifra.cpp:5:5: error: 'int main()' previously defined here int main() ^ veselcifra.cpp:70:5: error: expected ';' before 'while' while(n>9) ^ veselcifra.cpp:78:9: error: expected ';' before 'else' else ^ veselcifra.cpp:67:22: warning: unused variable 'c' [-Wunused-variable] long long int n, c , s=0; ^ veselcifra.cpp: At global scope: veselcifra.cpp:81:3: error: 'include' does not name a type }#include <iostream> ^ veselcifra.cpp: In function 'int main()': veselcifra.cpp:85:5: error: redefinition of 'int main()' int main() ^ veselcifra.cpp:5:5: error: 'int main()' previously defined here int main() ^ veselcifra.cpp:90:5: error: expected ';' before 'while' while(n>9) ^ veselcifra.cpp:87:22: warning: unused variable 'c' [-Wunused-variable] long long int n, c , s=0; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema veselCifra 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ă.