amy684
amy684 amy684
  • 22-10-2020
  • Computers and Technology
contestada

Write a for loop that uses the print function to display the integers from 10 down to 1 (including 10 & 1) in decreasing order

Respuesta :

WilliamFancyson
WilliamFancyson WilliamFancyson
  • 23-10-2020

Answer:

ill do this in Java, C# and C++

Java:

       for(int i = 10; i >=1; i--)

       {

           System.out.println(i);

       }

C#:

       for(int i = 10; i >=1; i--)

       {

           Console.WriteLine(i);

       }

C++:

       for(int i = 10; i >=1; i--)

       {

           cout << i << endl;

       }

Answer Link

Otras preguntas

A number is 10 more than another number. Twice the sum of the two numbers is 44. Find the two numbers.
Multiple Choice Questions 1. Which of the following statement best describes an atom? A. Protons and electrons are grouped together in a random pattern. B. Prot
What does iambic pentameter begin with? A. Soft syllable B. Loud syllable C. Unstressed syllable D. Stressed syllable
I =∫▒dx/(x^2 √(x^2+4))
Ernest wanted to stay on the island. identify the word class of the underline word, underlined word is stay and island​
what are the examples of catalystic reactions​
Use Distributive property to write the expression without parentheses !
Write a sentence using correct parallel structure.​
A box is 300 kg & it covers the area of 150 m2 find the pressure exerted by the box in the ground.​
For the respiration in yeast cells lab with the bottles and balloons what would be a suitable conclusion for the lab?