print the following using loop.
54321
4321
321
21
1






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 26 No

Post New Answer




More JavaScript Interview Questions

Write a program that inputs a 5-digit integer from the keyboard and prints if the input number is a palindrome or not. A palindrome is a number which has the same digit from either end.

1 Answers  


Write the code to maximize an image using javaScript?

2 Answers   Infosys,


what is the different between html and java?why the java is required in internet?

0 Answers  


if the two text boxes are there i want assign the vales like 2&3 and if i select button means i want find the sum.this is client side scripting in javascript

7 Answers   Infosys,


why can't we call a static method from a non-static method

0 Answers  






Can any one tell me how Java is purely an Oops language

3 Answers  


What is the main difference between Map collections and other collections such as Set.

0 Answers  


A milk carton can hold 3.78 litres of milk. Each morning, a dairy farm ships cartons of milk to a local grocery store. The cost of producing one litre of milk is $0.38, and the profit of each carton of milk is $0.27. Write a java program that prompts the user to enter the total amount of milk produced in the morning. Then display the number of milk cartons needed to hold milk, the cost of producing milk, and the profit for producing milk.

0 Answers  


Give code Email Checking

3 Answers  


since are functions need to create a webpage is available in dhtml& html. then why we are going for javascript

1 Answers  


What are the concepts of object oriented programming?Explain with an example.

1 Answers  


what is the purpose of using jsp?

1 Answers  






Categories