Use Conditional Loops (the while statement or the do-while statement) for the following: 1. Create a program that asks the user to enter a series of test scores and calculate their average. The user should enter -1 to signal the end of the scores. (hint: Ask user to enter the marks until -1 is entered)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Please help
Use Conditional Loops (the while statement or the do-while
statement) for the following:
1. Create a program that asks the user to enter a series of test scores
and calculate their average. The user should enter –1 to signal
the end of the scores. (hint: Ask user to enter the marks until –1
is entered)
2. Create a password program that uses a dialog box to accept a
password from the user. The user can try to enter the correct
password 5 times before the program displays a message box
saying that the password is not accepted and to please see their
Network Administrator. If the correct password is entered, then
it should display a message stating that the password is
accepted. (You may use a password of your choice)
Use counted loops (the for statement) for the following:
3. Create one application to perform each of the following. Each
time display a message before hand stating how many times the
statements inside the for loop execute. The message should be
similar to:
The following loop runs 15 times.
Display the numbers from 1 to 15
b. Display the numbers from 5 to 15
c. Display every second number from 2 to 20.
d. Display every even number from 40 to 20 counting down.
How many times does the loop run?
c. Display every second number from 25 to 1 counting down.
f. Add the odd numbers from 1 to 50.
g. Add every third number from 100 to 200.
a.
h. Add the numbers from 500 to 1000.
4.
a. Write a program that will display the 2 times table on the
form as 2X1=2, 2X2=4, 2X3=6 and so on.
b. Modify the above program so that it will print the times
table based on what the user enters. For example, if the
user enters 6 then the 6 times table will be printed.
5. Create a program that will allow a user to enter 2 numbers using
input dialog boxes and calculate the sum of the numbers
between the two numbers including the numbers entered. For
example, if the user enters 10 and 15, then the program would
calculate 10+11+12+13+14+15.
Transcribed Image Text:Use Conditional Loops (the while statement or the do-while statement) for the following: 1. Create a program that asks the user to enter a series of test scores and calculate their average. The user should enter –1 to signal the end of the scores. (hint: Ask user to enter the marks until –1 is entered) 2. Create a password program that uses a dialog box to accept a password from the user. The user can try to enter the correct password 5 times before the program displays a message box saying that the password is not accepted and to please see their Network Administrator. If the correct password is entered, then it should display a message stating that the password is accepted. (You may use a password of your choice) Use counted loops (the for statement) for the following: 3. Create one application to perform each of the following. Each time display a message before hand stating how many times the statements inside the for loop execute. The message should be similar to: The following loop runs 15 times. Display the numbers from 1 to 15 b. Display the numbers from 5 to 15 c. Display every second number from 2 to 20. d. Display every even number from 40 to 20 counting down. How many times does the loop run? c. Display every second number from 25 to 1 counting down. f. Add the odd numbers from 1 to 50. g. Add every third number from 100 to 200. a. h. Add the numbers from 500 to 1000. 4. a. Write a program that will display the 2 times table on the form as 2X1=2, 2X2=4, 2X3=6 and so on. b. Modify the above program so that it will print the times table based on what the user enters. For example, if the user enters 6 then the 6 times table will be printed. 5. Create a program that will allow a user to enter 2 numbers using input dialog boxes and calculate the sum of the numbers between the two numbers including the numbers entered. For example, if the user enters 10 and 15, then the program would calculate 10+11+12+13+14+15.
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY