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

How do you target a specific frame from a hyperlink?

0 Answers  


What is new keyword in javascript?

0 Answers  


How to have the status line update when the mouse goes over a link (the support of the status line is sporadic)?

0 Answers  


How to you change the title of the page by javascript?

0 Answers  


What is difference between arrow function and normal function?

0 Answers  






Where is javascript used most?

0 Answers  


Can array in javascript be extended?

0 Answers  


To write messages to the screen without using "document.write()"?

0 Answers  


How to use external JavaScript file?

0 Answers  


What is a closure in javascript?

0 Answers  


What is the difference between programing language and scripting language.?

3 Answers   Reliance, TCS,


how to post the form without submit button with help of javascript

2 Answers  


Categories