Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started