daily pastebin goal
68%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int main(int argc, char *argv[])
  2. {
  3.     int i,n;
  4.     int contador;
  5.    
  6.   printf("Digite um numero\n");
  7.   scanf ("%d",&n);
  8.  
  9.   contador = 0;
  10.   for ( i = 2; i < n-1; i++){
  11.    if (n%i==0)
  12.       {
  13.       contador++;
  14.       }
  15.      
  16.   }
  17.  
  18.  
  19.   if (contador>0) {
  20.       printf("%d não e primo",n);
  21.   }
  22.   else {
  23.        printf (" %d e primo",n);
  24.   }
  25.        
  26.   system("PAUSE"); 
  27.   return 0;
  28. }
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