+ 2

# Hello I need to print this figure 1 13 135 1357 how can do this question in for loop?

1 13 135 1357 answer me

25th Mar 2017, 9:22 AM
Bts...
+ 14
for(int i=1;i<m;i=i+2) { for(int j=1;j<=i;j++) { if(j%2!=0) cout<<j<<" "; } cout<<endl; }
25th Mar 2017, 10:09 AM
Sachin Artani
+ 7
here it is for(i=1;i<4 ;i++) { for(j=1;j<=i;j++) { cout<<2*j-1; } cout<<endl; } hope this helps.
25th Mar 2017, 10:09 AM
Rishabh Agrawal
+ 4
for(int i= 0;i<n;i++) { for(int j=0;j<i;j++) cout<<(2*j-1)<<"\t"; cout<<endl; } it would work.. đ
25th Mar 2017, 10:05 AM
Dhairya Agarwal
17th Feb 2019, 6:51 AM
Sachin Artani
+ 2
for(int i=0;i<4;i++) { for(int j=0;j<=i;j++) cout<<2*j+1<<"\t"; cout<<endl; }
25th Mar 2017, 10:23 AM
prashant kumar
+ 2
thank you my friends đ€đ
25th Mar 2017, 11:52 AM
Bts...
+ 1
Write python script to print the following 1 13 135 1357
5th Dec 2018, 1:01 PM
Charan Chowdary
+ 1
Hello friends I need to write program of Pascal triangle
16th Feb 2019, 5:57 PM
vikas gupta
+ 1
Can u help me???
16th Feb 2019, 5:58 PM
vikas gupta