Write a C# loop that counts down from 100 to 10 by 5s
using System;
class CountDown
{
static void Main(string[] args)
{
int i = 100;
while(i >= 10)
{
Console.WriteLine(i);
i -= 5;
}
}
}
Using C++ 1. Create a while loop that counts even numbers from 2 to 10 2. Create a for loop that counts by five (i.e. 0, 5, 10, ...) from 0 to 100 3. Ask for a person's age and give them three tries to give you a correct age (between 0 and 100) 4. Use a for loop to list Celsius and Fahrenheit temperatures. The "C" should be from -20 to 20 and the F should be shown correspondingly...
Using python, Write a while loop that counts from 1 to 20 by 4s.
write an assembly program that counts the number of bits that are set to a ‘1, in RO, and writes the total to R1. When finished, enter an infinite loop. 2.
write an assembly program that counts the number of bits that are set to a ‘1, in RO, and writes the total to R1. When finished, enter an infinite loop. 2.
C++ programming language Create a program that 1) counts from 0 to 10, but doeesn't include 10 2) counts backwards from 100 to 50 (inclusive) by 2's
in Linux, BASH Shell Write a while loop script called count that counts and prints the numbers 0 thru 9 without issuing a new line after each output.
Python Prompt the user to enter a step size to step down by. Write a while loop iterates from 30 down to 0 is step size as input. Prompt the user to enter a step size to step down by. Write a for loop iterates from 30 down to 0 is step size as input.
10. Write the heading (the first line) of a for statement whose loop control variable alpha counts from 37 through 1 in steps of 1. 11. What is the output of the following code fragment? (All variables are of type int.) limit 8 cout <<'H loopCount = 10; do cout x 'E; loopCount++ } while (loopCount <= limit); cout << "LP"
Javascript: Create a loop that counts from 1 to 20. // If the current number is even, add it to this empty array: var myArray = []; // If the current number is odd, log an odd number warning to // the console. // However, if the number equals 19, set a debug breakpoint. // After the loop completes, print the array to the console.
Write while loop to display the numbers from 10 through 1 and the squares. The output should display as following: n squared 10 100 9 81 8 64
Create a C# program that counts from -3 to 3 in the console using a do . . . while loop. Using a different kind of loop will result in a score of 0 for this problem.