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

3. Which type of radiation is used to make images of bones inside the body? A gamma rays B X-rays C infrared rays D ultraviolet rays
How do you classify a substance with a pH of 3?
Solve the system by substitution. Check your solution. a - 1.2b = -3 0.2b + 0.6a = 12 a. (15, 15) c. (13, 12) b. (10, 12) d. (7, 9)
Chinas relationship with Tibet Can best be described as?
describe the character sketch of the lost child in 80 words​
Jan typically earns $575 per week. She has $172.50 withheld from her paycheck each week. What percent is being withheld from her paycheck? Type your answer as
What the possible outcomes
what are the intermolecular force​
Which examples are relevant sources for students to use in research?
All euros have a national image on the "heads" side and a common design on the "tails" side. Spinning a coin, unlike tossing it, may not give heads and tails wi