Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c# Create a simplified, turn-based screen saver program. At a random location in the console window, print a string of text. Then wait for the

c#

Create a simplified, turn-based screen saver program. At a random location in the console window, print a string of text. Then wait for the user to press the enter key (Console.ReadLine()), clear the console window (Console.Clear()), and repeat the process at a new random location. Do this 5 times. The program should simulate a basic screen saver program, only dependent upon user input to progress.

Note: the Console class offers lots of interesting functions, such as the ability to change the foreground color, background color, etc. You could use this to make the program more interesting.

Write a stern program that asks the user to enter a number within some range. If the user tries to joke around and input something incorrect, ask again, and again, and again, until they learn to get it right. Use input validation in a loop until the user enters correct input.

Example Output

Please enter a number (1-10): -1

Please enter a number (1-10): 0

Please enter a number (1-10): 11

Please enter a number (1-10): ldkfjdlj

Please enter a number (1-10): true

Please enter a number (1-10): 3.8

Please enter a number (1-10): 7

You entered: 7 (finally)

Use a for loop to print the multiples of 10 between 1 and 100. Do this by looping 100 times and using a continue statement to skip loop iterations which are not multiples of 10.

Use a for loop to print the multiples of 10 between 1 and 100. Do this by looping only 10 times, perhaps by changing the update expression of the loop.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

2. What do you believe is at the root of the problem?

Answered: 1 week ago