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 is the use of a weakset object in javascript?

0 Answers  


What is === in javascript?

0 Answers  


Can you assign an anonymous function to a variable and pass it as an argument to another function?

0 Answers  


Which is better python or javascript?

0 Answers  


If an array with name as "names" contain three elements, then how will you print the third element of this array?

0 Answers  






What is javascript hoisting?

0 Answers  


Why is object naming important to use in javascript?

0 Answers  


How to toggle display an html element?

0 Answers  


How do you add an element at the beginning of an array?

0 Answers  


What is null in js?

0 Answers  


What is MEAN in javascript

1 Answers  


What is an Event Bubbling in Javascript?

0 Answers  


Categories