Să se scrie un program care afișează divizorii comuni ai două numere naturale citite de la tastatură.
Problema | AfisareDivizoriComuni | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #10215626 | Utilizator | |
Fișier | afisaredivizoricomuni.cpp | Dimensiune | 265 B |
Data încărcării | 01 Septembrie 2018, 12:40 | Scor / rezultat | Eroare de compilare |
afisaredivizoricomuni.cpp:1:9: error: #include expects "FILENAME" or <FILENAME> #include <iostream> ^ afisaredivizoricomuni.cpp:2:1: error: stray '\302' in program using namespace std; ^ afisaredivizoricomuni.cpp:2:1: error: stray '\240' in program afisaredivizoricomuni.cpp:2:1: error: stray '\302' in program afisaredivizoricomuni.cpp:2:1: error: stray '\240' in program afisaredivizoricomuni.cpp:3:1: error: stray '\302' in program int a, b, d, i, r; ^ afisaredivizoricomuni.cpp:3:1: error: stray '\240' in program afisaredivizoricomuni.cpp:3:1: error: stray '\302' in program afisaredivizoricomuni.cpp:3:1: error: stray '\240' in program afisaredivizoricomuni.cpp:3:1: error: stray '\302' in program afisaredivizoricomuni.cpp:3:1: error: stray '\240' in program afisaredivizoricomuni.cpp:3:1: error: stray '\302' in program afisaredivizoricomuni.cpp:3:1: error: stray '\240' in program afisaredivizoricomuni.cpp:3:1: error: stray '\302' in program afisaredivizoricomuni.cpp:3:1: error: stray '\240' in program afisaredivizoricomuni.cpp:4:1: error: stray '\302' in program int main() ^ afisaredivizoricomuni.cpp:4:1: error: stray '\240' in program afisaredivizoricomuni.cpp:8:1: error: stray '\302' in program cin >> a >> b; ^ afisaredivizoricomuni.cpp:8:1: error: stray '\240' in program afisaredivizoricomuni.cpp:8:1: error: stray '\302' in program afisaredivizoricomuni.cpp:8:1: error: stray '\240' in program afisaredivizoricomuni.cpp:8:1: error: stray '\302' in program afisaredivizoricomuni.cpp:8:1: error: stray '\240' in program afisaredivizoricomuni.cpp:8:1: error: stray '\302' in program afisaredivizoricomuni.cpp:8:1: error: stray '\240' in program afisaredivizoricomuni.cpp:9:1: error: stray '\302' in program d = a; ^ afisaredivizoricomuni.cpp:9:1: error: stray '\240' in program afisaredivizoricomuni.cpp:9:1: error: stray '\302' in program afisaredivizoricomuni.cpp:9:1: error: stray '\240' in program afisaredivizoricomuni.cpp:10:1: error: stray '\302' in program i = b; ^ afisaredivizoricomuni.cpp:10:1: error: stray '\240' in program afisaredivizoricomuni.cpp:10:1: error: stray '\302' in program afisaredivizoricomuni.cpp:10:1: error: stray '\240' in program afisaredivizoricomuni.cpp:13:1: error: stray '\302' in program d = i; ^ afisaredivizoricomuni.cpp:13:1: error: stray '\240' in program afisaredivizoricomuni.cpp:13:1: error: stray '\302' in program afisaredivizoricomuni.cpp:13:1: error: stray '\240' in program afisaredivizoricomuni.cpp:14:1: error: stray '\302' in program i = r; ^ afisaredivizoricomuni.cpp:14:1: error: stray '\240' in program afisaredivizoricomuni.cpp:14:1: error: stray '\302' in program afisaredivizoricomuni.cpp:14:1: error: stray '\240' in program afisaredivizoricomuni.cpp:15:1: error: stray '\302' in program r = d%i; ^ afisaredivizoricomuni.cpp:15:1: error: stray '\240' in program afisaredivizoricomuni.cpp:15:1: error: stray '\302' in program afisaredivizoricomuni.cpp:15:1: error: stray '\240' in program afisaredivizoricomuni.cpp:18:1: error: stray '\302' in program for(d=1 ; d<=i; d++) ^ afisaredivizoricomuni.cpp:18:1: error: stray '\240' in program afisaredivizoricomuni.cpp:18:1: error: stray '\302' in program afisaredivizoricomuni.cpp:18:1: error: stray '\240' in program afisaredivizoricomuni.cpp:18:1: error: stray '\302' in program afisaredivizoricomuni.cpp:18:1: error: stray '\240' in program afisaredivizoricomuni.cpp:19:1: error: stray '\302' in program if(i % d == 0) ^ afisaredivizoricomuni.cpp:19:1: error: stray '\240' in program afisaredivizoricomuni.cpp:19:1: error: stray '\302' in program afisaredivizoricomuni.cpp:19:1: error: stray '\240' in program afisaredivizoricomuni.cpp:19:1: error: stray '\302' in program afisaredivizoricomuni.cpp:19:1: error: stray '\240' in program afisaredivizoricomuni.cpp:19:1: error: stray '\302' in program afisaredivizoricomuni.cpp:19:1: error: stray '\240' in program afisaredivizoricomuni.cpp:20:1: error: stray '\302' in program cout << d << " "; ^ afisaredivizoricomuni.cpp:20:1: error: stray '\240' in program afisaredivizoricomuni.cpp:20:1: error: stray '\302' in program afisaredivizoricomuni.cpp:20:1: error: stray '\240' in program afisaredivizoricomuni.cpp:20:1: error: stray '\302' in program afisaredivizoricomuni.cpp:20:1: error: stray '\240' in program afisaredivizoricomuni.cpp:20:1: error: stray '\302' in program afisaredivizoricomuni.cpp:20:1: error: stray '\240' in program afisaredivizoricomuni.cpp:22:1: error: stray '\302' in program return 0; ^ afisaredivizoricomuni.cpp:22:1: error: stray '\240' in program afisaredivizoricomuni.cpp: In function 'int main()': afisaredivizoricomuni.cpp:8:1: error: 'cin' was not declared in this scope cin >> a >> b; ^ afisaredivizoricomuni.cpp:20:1: error: 'cout' was not declared in this scope cout << d << " "; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema AfisareDivizoriComuni 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ă.