Advertisement
Josif_tepe

Untitled

Nov 15th, 2022
589
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(){
  5.     int A, B;
  6.     scanf("%d%d", &A, &B);
  7.     // 5 10
  8.    
  9.    
  10.     for(int i = A + 1; i <= B; i++) { // 6
  11.         long long factorial = 1;
  12.        
  13.         for(int j = 1; j <= i; j++) { // j = 6
  14.             factorial *= j;
  15.             //120 * 6 = 720
  16.         }
  17.        
  18.         printf("Faktoriel od %d e %ld\n", i, factorial);
  19.     }
  20.    
  21.    
  22.    
  23.     return 0;
  24.  
  25. }
  26.  
  27. /*
  28. 2
  29. J J K Q
  30. A K Q K
  31.  
  32.  **/
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement