print the following using loop.
54321
4321
321
21
1

Answers were Sorted based on User's Feedback



print the following using loop. 54321 4321 321 21 1..

Answer / rabin111

int i,j;
for(i=5;i>=1;i--)
{
for(j=i;j>=1;j--)
{
cout<<j;
}
cout<<"
"
}

Is This Answer Correct ?    0 Yes 4 No

print the following using loop. 54321 4321 321 21 1..

Answer / manikandan

int n=5;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=n;j++)
{
cout<<i;
}
cout<<j;
}

Is This Answer Correct ?    8 Yes 31 No

Post New Answer

More JavaScript Interview Questions

What are the four basic data structures in javascript?

1 Answers  


how to disable source option at view menu in browser like internet explorer...mozilla...etc..pls help me...

2 Answers   IIS,


What is a boolean search?

1 Answers  


What is difference between arrow function and normal function?

1 Answers  


What are the application of javascript?

1 Answers  


Between JavaScript and an ASP script, which is faster?

1 Answers  


Where javascript variables are stored?

1 Answers  


Advantages & Disadvavtages of Java Script? Advantages & Disadvantages of CGI Scripting? Structure of Java Script? Commands of Java Script? HTML Basic Reviews?

3 Answers  


What are javascript properties?

1 Answers  


What is client side programming?

1 Answers  


Can you put javascript in html?

1 Answers  


Javascript, Pass by Value or Pass by Reference?

1 Answers  


Categories