#67
AproapePrim
C++
Să se scrie o funcție C++ care verifică dacă un număr natural transmis ca parametru este aproape prim.
Problema | AproapePrim | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #9851401 | Utilizator | |
Fișier | aproapeprim.cpp | Dimensiune | 657 B |
Data încărcării | 06 Iunie 2018, 21:36 | Scor / rezultat | Eroare de compilare |
aproapeprim.cpp:4:1: error: stray '\302' in program Int a_prim(int n) ^ aproapeprim.cpp:4:1: error: stray '\240' in program aproapeprim.cpp:4:1: error: stray '\302' in program aproapeprim.cpp:4:1: error: stray '\240' in program aproapeprim.cpp:6:1: error: stray '\302' in program int aprim = 0; ^ aproapeprim.cpp:6:1: error: stray '\240' in program aproapeprim.cpp:6:1: error: stray '\302' in program aproapeprim.cpp:6:1: error: stray '\240' in program aproapeprim.cpp:6:1: error: stray '\302' in program aproapeprim.cpp:6:1: error: stray '\240' in program aproapeprim.cpp:7:1: error: stray '\302' in program int d = 2, k, a, b; ^ aproapeprim.cpp:7:1: error: stray '\240' in program aproapeprim.cpp:7:1: error: stray '\302' in program aproapeprim.cpp:7:1: error: stray '\240' in program aproapeprim.cpp:7:1: error: stray '\302' in program aproapeprim.cpp:7:1: error: stray '\240' in program aproapeprim.cpp:7:1: error: stray '\302' in program aproapeprim.cpp:7:1: error: stray '\240' in program aproapeprim.cpp:7:1: error: stray '\302' in program aproapeprim.cpp:7:1: error: stray '\240' in program aproapeprim.cpp:7:1: error: stray '\302' in program aproapeprim.cpp:7:1: error: stray '\240' in program aproapeprim.cpp:8:1: error: stray '\302' in program while(!aprim && d*d<n) ^ aproapeprim.cpp:8:1: error: stray '\240' in program aproapeprim.cpp:8:1: error: stray '\302' in program aproapeprim.cpp:8:1: error: stray '\240' in program aproapeprim.cpp:10:1: error: stray '\302' in program if(n % d == 0) ^ aproapeprim.cpp:10:1: error: stray '\240' in program aproapeprim.cpp:10:1: error: stray '\302' in program aproapeprim.cpp:10:1: error: stray '\240' in program aproapeprim.cpp:10:1: error: stray '\302' in program aproapeprim.cpp:10:1: error: stray '\240' in program aproapeprim.cpp:10:1: error: stray '\302' in program aproapeprim.cpp:10:1: error: stray '\240' in program aproapeprim.cpp:12:1: error: stray '\302' in program a = d; ^ aproapeprim.cpp:12:1: error: stray '\240' in program aproapeprim.cpp:12:1: error: stray '\302' in program aproapeprim.cpp:12:1: error: stray '\240' in program aproapeprim.cpp:13:1: error: stray '\302' in program b = n / d; ^ aproapeprim.cpp:13:1: error: stray '\240' in program aproapeprim.cpp:13:1: error: stray '\302' in program aproapeprim.cpp:13:1: error: stray '\240' in program aproapeprim.cpp:13:1: error: stray '\302' in program aproapeprim.cpp:13:1: error: stray '\240' in program aproapeprim.cpp:13:1: error: stray '\302' in program aproapeprim.cpp:13:1: error: stray '\240' in program aproapeprim.cpp:14:1: error: stray '\302' in program int prim = 1; ^ aproapeprim.cpp:14:1: error: stray '\240' in program aproapeprim.cpp:14:1: error: stray '\302' in program aproapeprim.cpp:14:1: error: stray '\240' in program aproapeprim.cpp:14:1: error: stray '\302' in program aproapeprim.cpp:14:1: error: stray '\240' in program aproapeprim.cpp:15:1: error: stray '\302' in program if(a < 2) ^ aproapeprim.cpp:15:1: error: stray '\240' in program aproapeprim.cpp:15:1: error: stray '\302' in program aproapeprim.cpp:15:1: error: stray '\240' in program aproapeprim.cpp:16:1: error: stray '\302' in program prim = 0; ^ aproapeprim.cpp:16:1: error: stray '\240' in program aproapeprim.cpp:16:1: error: stray '\302' in program aproapeprim.cpp:16:1: error: stray '\240' in program aproapeprim.cpp:17:1: error: stray '\302' in program if(a > 2 && a % 2 == 0) ^ aproapeprim.cpp:17:1: error: stray '\240' in program aproapeprim.cpp:17:1: error: stray '\302' in program aproapeprim.cpp:17:1: error: stray '\240' in program aproapeprim.cpp:17:1: error: stray '\302' in program aproapeprim.cpp:17:1: error: stray '\240' in program aproapeprim.cpp:17:1: error: stray '\302' in program aproapeprim.cpp:17:1: error: stray '\240' in program aproapeprim.cpp:17:1: error: stray '\302' in program aproapeprim.cpp:17:1: error: stray '\240' in program aproapeprim.cpp:17:1: error: stray '\302' in program aproapeprim.cpp:17:1: error: stray '\240' in program aproapeprim.cpp:17:1: error: stray '\302' in program aproapeprim.cpp:17:1: error: stray '\240' in program aproapeprim.cpp:17:1: error: stray '\302' in program aproapeprim.cpp:17:1: error: stray '\240' in program aproapeprim.cpp:18:1: error: stray '\302' in program prim = 0; ^ aproapeprim.cpp:18:1: error: stray '\240' in program aproapeprim.cpp:18:1: error: stray '\302' in program aproapeprim.cpp:18:1: error: stray '\240' in program aproapeprim.cpp:19:1: error: stray '\302' in program for(k = 3; k * k <= a ; k = k + 2) ^ aproapeprim.cpp:19:1: error: stray '\240' in program aproapeprim.cpp:19:1: error: stray '\302' in program aproapeprim.cpp:19:1: error: stray '\240' in program aproapeprim.cpp:19:1: error: stray '\302' in program aproapeprim.cpp:19:1: error: stray '\240' in program aproapeprim.cpp:19:1: error: stray '\302' in program aproapeprim.cpp:19:1: error: stray '\240' in program aproapeprim.cpp:19:1: error: stray '\302' in program aproapeprim.cpp:19:1: error: stray '\240' in program aproapeprim.cpp:19:1: error: stray '\302' in program aproapeprim.cpp:19:1: error: stray '\240' in program aproapeprim.cpp:19:1: error: stray '\302' in program aproapeprim.cpp:19:1: error: stray '\240' in program aproapeprim.cpp:19:1: error: stray '\302' in program aproapeprim.cpp:19:1: error: stray '\240' in program aproapeprim.cpp:19:1: error: stray '\302' in program aproapeprim.cpp:19:1: error: stray '\240' in program aproapeprim.cpp:19:1: error: stray '\302' in program aproapeprim.cpp:19:1: error: stray '\240' in program aproapeprim.cpp:19:1: error: stray '\302' in program aproapeprim.cpp:19:1: error: stray '\240' in program aproapeprim.cpp:19:1: error: stray '\302' in program aproapeprim.cpp:19:1: error: stray '\240' in program aproapeprim.cpp:19:1: error: stray '\302' in program aproapeprim.cpp:19:1: error: stray '\240' in program aproapeprim.cpp:20:1: error: stray '\302' in program if(a % k == 0) ^ aproapeprim.cpp:20:1: error: stray '\240' in program aproapeprim.cpp:20:1: error: stray '\302' in program aproapeprim.cpp:20:1: error: stray '\240' in program aproapeprim.cpp:20:1: error: stray '\302' in program aproapeprim.cpp:20:1: error: stray '\240' in program aproapeprim.cpp:20:1: error: stray '\302' in program aproapeprim.cpp:20:1: error: stray '\240' in program aproapeprim.cpp:21:1: error: stray '\302' in program prim = 0; ^ aproapeprim.cpp:21:1: error: stray '\240' in program aproapeprim.cpp:21:1: error: stray '\302' in program aproapeprim.cpp:21:1: error: stray '\240' in program aproapeprim.cpp:24:1: error: stray '\302' in program if(b < 2) ^ aproapeprim.cpp:24:1: error: stray '\240' in program aproapeprim.cpp:24:1: error: stray '\302' in program aproapeprim.cpp:24:1: error: stray '\240' in program aproapeprim.cpp:25:1: error: stray '\302' in program prim = 0; ^ aproapeprim.cpp:25:1: error: stray '\240' in program aproapeprim.cpp:25:1: error: stray '\302' in program aproapeprim.cpp:25:1: error: stray '\240' in program aproapeprim.cpp:26:1: error: stray '\302' in program if(b > 2 && b % 2 == 0) ^ aproapeprim.cpp:26:1: error: stray '\240' in program aproapeprim.cpp:26:1: error: stray '\302' in program aproapeprim.cpp:26:1: error: stray '\240' in program aproapeprim.cpp:26:1: error: stray '\302' in program aproapeprim.cpp:26:1: error: stray '\240' in program aproapeprim.cpp:26:1: error: stray '\302' in program aproapeprim.cpp:26:1: error: stray '\240' in program aproapeprim.cpp:26:1: error: stray '\302' in program aproapeprim.cpp:26:1: error: stray '\240' in program aproapeprim.cpp:26:1: error: stray '\302' in program aproapeprim.cpp:26:1: error: stray '\240' in program aproapeprim.cpp:26:1: error: stray '\302' in program aproapeprim.cpp:26:1: error: stray '\240' in program aproapeprim.cpp:26:1: error: stray '\302' in program aproapeprim.cpp:26:1: error: stray '\240' in program aproapeprim.cpp:27:1: error: stray '\302' in program prim = 0; ^ aproapeprim.cpp:27:1: error: stray '\240' in program aproapeprim.cpp:27:1: error: stray '\302' in program aproapeprim.cpp:27:1: error: stray '\240' in program aproapeprim.cpp:28:1: error: stray '\302' in program for(k = 3; k * k <= b ; k += 2) ^ aproapeprim.cpp:28:1: error: stray '\240' in program aproapeprim.cpp:28:1: error: stray '\302' in program aproapeprim.cpp:28:1: error: stray '\240' in program aproapeprim.cpp:28:1: error: stray '\302' in program aproapeprim.cpp:28:1: error: stray '\240' in program aproapeprim.cpp:28:1: error: stray '\302' in program aproapeprim.cpp:28:1: error: stray '\240' in program aproapeprim.cpp:28:1: error: stray '\302' in program aproapeprim.cpp:28:1: error: stray '\240' in program aproapeprim.cpp:28:1: error: stray '\302' in program aproapeprim.cpp:28:1: error: stray '\240' in program aproapeprim.cpp:28:1: error: stray '\302' in program aproapeprim.cpp:28:1: error: stray '\240' in program aproapeprim.cpp:28:1: error: stray '\302' in program aproapeprim.cpp:28:1: error: stray '\240' in program aproapeprim.cpp:28:1: error: stray '\302' in program aproapeprim.cpp:28:1: error: stray '\240' in program aproapeprim.cpp:28:1: error: stray '\302' in program aproapeprim.cpp:28:1: error: stray '\240' in program aproapeprim.cpp:28:1: error: stray '\302' in program aproapeprim.cpp:28:1: error: stray '\240' in program aproapeprim.cpp:29:1: error: stray '\302' in program if(b % k == 0) ^ aproapeprim.cpp:29:1: error: stray '\240' in program aproapeprim.cpp:29:1: error: stray '\302' in program aproapeprim.cpp:29:1: error: stray '\240' in program aproapeprim.cpp:29:1: error: stray '\302' in program aproapeprim.cpp:29:1: error: stray '\240' in program aproapeprim.cpp:29:1: error: stray '\302' in program aproapeprim.cpp:29:1: error: stray '\240' in program aproapeprim.cpp:30:1: error: stray '\302' in program prim = 0; ^ aproapeprim.cpp:30:1: error: stray '\240' in program aproapeprim.cpp:30:1: error: stray '\302' in program aproapeprim.cpp:30:1: error: stray '\240' in program aproapeprim.cpp:32:1: error: stray '\302' in program aprim = 1; ^ aproapeprim.cpp:32:1: error: stray '\240' in program aproapeprim.cpp:32:1: error: stray '\302' in program aproapeprim.cpp:32:1: error: stray '\240' in program aproapeprim.cpp:38:1: error: stray '\302' in program d = d + 2; ^ aproapeprim.cpp:38:1: error: stray '\240' in program aproapeprim.cpp:38:1: error: stray '\302' in program aproapeprim.cpp:38:1: error: stray '\240' in program aproapeprim.cpp:38:1: error: stray '\302' in program aproapeprim.cpp:38:1: error: stray '\240' in program aproapeprim.cpp:38:1: error: stray '\302' in program aproapeprim.cpp:38:1: error: stray '\240' in program aproapeprim.cpp:40:1: error: stray '\302' in program return aprim; ^ aproapeprim.cpp:40:1: error: stray '\240' in program aproapeprim.cpp:40:1: error: stray '\302' in program aproapeprim.cpp:40:1: error: stray '\240' in program aproapeprim.cpp:40:1: error: stray '\302' in program aproapeprim.cpp:40:1: error: stray '\240' in program aproapeprim.cpp:40:1: error: stray '\302' in program aproapeprim.cpp:40:1: error: stray '\240' in program aproapeprim.cpp:40:1: error: stray '\302' in program aproapeprim.cpp:40:1: error: stray '\240' in program aproapeprim.cpp:43:1: error: stray '\310' in program Citește mai multe pe Brainly.ro - https://brainly.ro/tema/3429164#readmore ^ aproapeprim.cpp:43:1: error: stray '\231' in program aproapeprim.cpp:4:1: error: 'Int' does not name a type Int a_prim(int n) ^ aproapeprim.cpp:43:1: error: 'Cite' does not name a type Citește mai multe pe Brainly.ro - https://brainly.ro/tema/3429164#readmore ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema AproapePrim face parte din a doua categorie. Pentru aceste probleme se folosește un program suport, furnizat de propunătorul problemei. 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ă.