Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello, I need help with this homework: This assignment involves loops: 1. Create

ID: 3926622 • Letter: H

Question

Hello, I need help with this homework:

This assignment involves loops:

1. Create a for loop that displays 10 random numbers. Random is an object that produces a random number. Below is a piece of code that produces a random number between 1 and 50:

_____________________________________

_____________________________________

2. Create a for loop that counts down (and displays the count) from 10 to 0.

3. Create a while loop that displays the count of the loops and then asks the user whether they want to continue or not. If yes, then continue; if no the program should end and display a a note saying thank you.

4. Create a do loop that runs until a user enters "Stop."

Using visual studio 2015 C# language.

Thank you.

Explanation / Answer

1) Random rand = new Random();
for (int i = 0; i < 10; i++)
{
Console.WriteLine(rand.Next(1, 501));
}

2)

for (int i = 10; i >=0; i--)
{
c++;
}
Console.WriteLine(c);

3)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote