Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- int n;
- scanf("%d", &n);
- int niza[n];
- for(int i = 0; i < n; i++) {
- scanf("%d", &niza[i]);
- }
- for(int i = 0; i < n; i++) {
- int broj_na_deliteli = 0;
- for(int j = 1; j <= niza[i]; j++) {
- if(niza[i] % j == 0) {
- broj_na_deliteli++;
- }
- }
- if(broj_na_deliteli <= 2) {
- printf("Brojot %d e PROST\n", niza[i]);
- }
- else {
- printf("Brojot %d e SLOZHEN\n", niza[i]);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement