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