Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int j,i,num;
- scanf("%d",&num);
- for(i=1; i<=num; i++)
- {
- for(i=1; i<=j; i++)
- {
- if(i%2!=0)
- printf("%d ",i);
- }
- printf("\n");
- for(j=1; j<=i; j++)
- {
- if(j%2==0)
- printf("%d ",j);
- }
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment