that_one_nigga_you_k

aritmetica problem

Jun 20th, 2023
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.  
  5.     int min, max, fin, k, aux, i;
  6.  
  7.     min = 10;
  8.     max = 40;
  9.     i = 1;
  10.  
  11.     fin = min;
  12.    
  13.  
  14.     k = 3;
  15.     aux = 2;
  16.  
  17.     while(fin<=max){
  18.  
  19.         for(int j = 1 ; i <=fin/2 ; j++){
  20.        
  21.             if(fin%j == 0){
  22.                 aux++;
  23.             }
  24.        
  25.         }
  26.  
  27.         if(aux>k) k = aux;
  28.  
  29.         i++;
  30.         fin++;
  31.     }
  32.  
  33.     printf("%d", k);
  34.  
  35.     return(0);
  36.  
  37. }
Add Comment
Please, Sign In to add comment