+ 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
9 Antworten
+ 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;
}
+ 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.
+ 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..
😉
+ 4
Hi vikas gupta
You can search for it. I guess there are many answers available -
https://code.sololearn.com/cgkym4obpaHW/?ref=app
https://code.sololearn.com/cq1svLtZekv3/?ref=app
https://code.sololearn.com/cjwCLYf31JBD/?ref=app
+ 2
for(int i=0;i<4;i++) {
for(int j=0;j<=i;j++)
cout<<2*j+1<<"\t";
cout<<endl;
}
+ 2
thank you my friends 🤗🙂
+ 1
Write python script to print the following
1
13
135
1357
+ 1
Hello friends I need to write program of Pascal triangle
+ 1
Can u help me???