Advertisement
Rehan_Rahman26

uri 1145

Nov 23rd, 2020
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int i,a,b,c,d,e,f=1;
  5.     scanf("%d %d",&a,&d);
  6.     b = d/a;
  7.     e = a;
  8.     for(i=1; i<=b; i++){
  9.        
  10.         printf("%d",f);
  11.         for(c=f+1; c<=e; c++)
  12.         printf(" %d",c);
  13.         printf("\n");
  14.         f+=a;
  15.         e+=a;
  16.     }
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement