fork download
  1. // You are using GCC
  2. #include<stdio.h>
  3. int main()
  4. {
  5. long int a,i,j,k;
  6. scanf("%ld",&a);
  7. for(i=1;i<=a;i++)
  8. {
  9.  
  10. if(i%2!=0)
  11. {
  12. for(k=1;k<=i&&k<=100;k++)
  13. {
  14. if(k==1)
  15. {
  16. printf("%d",k);
  17. k=k+2;
  18. }
  19. else
  20. {
  21. printf("%d",k);
  22. k=k+2;
  23. }
  24. }
  25. printf("\n");
  26. }
  27. else
  28. {
  29. for(k=1;k<=i&&k<=100;k++)
  30. {
  31.  
  32. printf("%d",k*2);
  33. }
  34. printf("\n");
  35. }
  36.  
  37.  
  38. }
  39. }
Success #stdin #stdout 0s 9424KB
stdin
6
stdout
1
24
1
2468
14
24681012