Homework Update your code from Exercise 1 to ask the user to input two integer values x and y, then print all prime numbers between them, including x and y using nested for loops. Use a do-while loop to make sure the user enters y > x; Sample output: Microsoft Visual Studio Debug Console Enter 2 numbers x and y (x should be smaller than y): 90 4 Enter 2 numbers x and y (x should be smaller than y): 4 90 The prime numbers between 4 and 90 are: 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter5: Looping
Section: Chapter Questions
Problem 7RQ
icon
Related questions
Question
Homework
Update your code from Exercise 1 to ask the user to input two integer values x and y, then print
all prime numbers between them, including x and y using nested for loops.
Use a do-while loop to make sure the user enters y > x;
Sample output:
Microsoft Visual Studio Debug Console
Enter 2 numbers x and y (x should be smaller than y): 90 4
Enter 2 numbers x and y (x should be smaller than y): 4 90
The prime numbers between 4 and 90 are:
5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89
Transcribed Image Text:Homework Update your code from Exercise 1 to ask the user to input two integer values x and y, then print all prime numbers between them, including x and y using nested for loops. Use a do-while loop to make sure the user enters y > x; Sample output: Microsoft Visual Studio Debug Console Enter 2 numbers x and y (x should be smaller than y): 90 4 Enter 2 numbers x and y (x should be smaller than y): 4 90 The prime numbers between 4 and 90 are: 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Types of Expressions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,