Advertisement
dllbridge

Untitled

Jun 21st, 2024
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.57 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3.  
  4.  
  5. int     nx,
  6.         ng,                              //       Всего групп по 7 книг
  7.         no;                              //  остаток от групп из 7 книг    
  8.  
  9.  
  10.  
  11. ///////////////////////////////////////////
  12. int main()                               //  
  13. {
  14.    
  15.    
  16.    
  17.     printf("Enter count of books: ");  scanf("%d", &nx);
  18.    
  19.     printf("nx = %d\n", nx);
  20.    
  21.     ng = nx / 7;    
  22.     no = nx % 7;
  23.  
  24.     printf("ng = %d\n", ng);
  25.     printf("no = %d\n", no);            
  26. }
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement