Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Online C Compiler.
- Code, Compile, Run and Debug C program online.
- Write your code in this editor and press "Run" button to compile and execute it.
- *******************************************************************************/
- #include <stdio.h>
- int count_dev(int the_num)
- {
- int counterr=0;
- for (int runer=1;runer <= the_num;runer++)
- {
- if (the_num%runer==0)
- {
- counterr=counterr+1;
- }
- }
- return counterr;
- }
- int main()
- {
- int N;
- int dev_of_N;
- printf("enter the number N:");
- scanf("%d", &N);
- dev_of_N=count_dev(N);
- for (int count2=1; count2<=N-1;count2++)
- {
- if (count_dev(count2)>=dev_of_N)
- {
- printf("0");
- return 0;
- }
- }
- printf("1");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement