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