Advertisement
PROFESSOR_AIH

Array Fill II

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