Advertisement
Anik_Akash

Logical Sequence 2

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