daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Jan 11th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /******************************************************************************
  2.  
  3.                             Online C Compiler.
  4.                 Code, Compile, Run and Debug C program online.
  5. Write your code in this editor and press "Run" button to compile and execute it.
  6.  
  7. *******************************************************************************/
  8.  
  9. #include <stdio.h>
  10. int count_dev(int the_num)
  11. {
  12.     int counterr=0;
  13.     for (int runer=1;runer <= the_num;runer++)
  14.     {
  15.         if (the_num%runer==0)
  16.         {
  17.             counterr=counterr+1;
  18.         }
  19.     }
  20.     return counterr;
  21. }
  22. int main()
  23. {
  24.     int N;
  25.     int dev_of_N;
  26.     printf("enter the number N:");
  27.     scanf("%d", &N);
  28.     dev_of_N=count_dev(N);
  29.     for (int count2=1; count2<=N-1;count2++)
  30.     {
  31.         if (count_dev(count2)>=dev_of_N)
  32.         {
  33.             printf("0");
  34.             return 0;
  35.         }
  36.     }
  37.     printf("1");
  38.     return 0;
  39. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top