Pratimas patikrinti, ar pirminis
- [1] 2023-03-18 12:46 (70)
- [2] 2023-03-18 12:49 (0)
- [3] 2023-03-18 12:50 (70)
- [4] 2023-03-18 12:53 (70)
Taškai: 0
Compile: FAIL
pratimas_patikrinti_ar_pirminis.cpp:4:5: error: expected primary-expression before ‘if’ 4 | if(n==1)return false; | ^~ pratimas_patikrinti_ar_pirminis.cpp:4:5: error: expected ‘}’ before ‘if’ pratimas_patikrinti_ar_pirminis.cpp:3:16: note: to match this ‘{’ 3 | bool arPirminis{ | ^ pratimas_patikrinti_ar_pirminis.cpp:6:5: error: expected unqualified-id before ‘for’ 6 | for(int i = 2; i * i <= n; i++){ | ^~~ pratimas_patikrinti_ar_pirminis.cpp:6:20: error: ‘i’ does not name a type 6 | for(int i = 2; i * i <= n; i++){ | ^ pratimas_patikrinti_ar_pirminis.cpp:6:32: error: ‘i’ does not name a type 6 | for(int i = 2; i * i <= n; i++){ | ^ pratimas_patikrinti_ar_pirminis.cpp:9:5: error: expected unqualified-id before ‘return’ 9 | return true; | ^~~~~~ pratimas_patikrinti_ar_pirminis.cpp:10:1: error: expected declaration before ‘}’ token 10 | } | ^ pratimas_patikrinti_ar_pirminis.cpp: In function ‘int main()’: pratimas_patikrinti_ar_pirminis.cpp:16:18: error: ‘arPirminis’ cannot be used as a function 16 | if(arPirminis(n)) cout << "TAIP"; | ~~~~~~~~~~^~~
nr. | result | time | message |
---|