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 different types of errors in javascript?

0 Answers  


What are trailing whitespace?

0 Answers  


Which symbol is used for comments in Javascript?

0 Answers  


What is a good javascript editor?

0 Answers  


How to add a combo box dynamically at run time in Java script?

5 Answers  






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

2 Answers  


How to hide javascript code from old browsers that dont run it?

0 Answers  


How to write a hello world example of javascript?

0 Answers  


What is servlet in javascript?

0 Answers  


Can you tell me how to send email using javascript?

2 Answers  


How to create multiline strings in javascript?

0 Answers  


What are parameters in javascript?

0 Answers  


Categories