Advertisement
dsdeep

ques1

Aug 24th, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.48 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     int a,n,i,j,w,s,e,count=3;
  6.     scanf("%d",&a);
  7.     for(i=0; i<a; i++)
  8.     {
  9.         if(i==0)
  10.         {
  11.             scanf("%d",&n);
  12.             w=0;
  13.             s=n;
  14.             e=n+10;
  15.             printf("%ds, %ds, %ds\n",w,s,e);
  16.         }
  17.         else
  18.         {
  19.             scanf("%d",&n);
  20.             w=e-n;
  21.             s=e;
  22.             e=s+10;
  23.             printf("%ds, %ds, %ds\n",w,s,e);
  24.         }
  25.  
  26.     }
  27.     return 0;
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement