Exercise#1: Number Sequence Using nested loops, continue and break, write a program that prompts the user to input data for fi students. Each student's data contains student first name and test scores. The program should accept positi integers only for test scores and ignore non-positive integers. Each student may has a different number test scores; the program should receive input for test scores until input “0". Finally, the program outpu each student name with the sum of his/her marks. Sample Input/Output: Enter Student name: Khaled 65 78 -40 56 -25 89 0 The student 'Khaled' has the total marks = 288 Enter Student name: Kamal 37 55 44 -77 22 18 56 26 0 The student 'Kamal' has the total marks = 258 Enter Student name: Ali 66 33 87 66 87 -25 25 39 78 0 The student 'Ali' has the total marks Enter Student name: Taher 72 67 -33 0 The student 'Taher' has the total marks = 139 Enter Student name: Ahmed 75 68 84 -18 90 0 The student 'Ahmed' has the total marks = 317 481

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
Exercise#1: Number Sequence
Using nested loops, continue and break, write a program that prompts the user to input data for five
students. Each student's data contains student first name and test scores. The program should accept positive
integers only for test scores and ignore non-positive integers. Each student may has a different number of
test scores; the program should receive input for test scores until input "0". Finally, the program outputs
each student name with the sum of his/her marks.
Sample Input/Output:
Enter Student name: Khaled 65 78 -40 56 -25 89 0
The student 'Khaled' has the total marks = 288
Enter Student name: Kamal 37 55 44 -77 22 18 56 26 0
The student 'Kamal' has the total marks = 258
Enter Student name: Ali 66 33 87 66 87 -25 25 39 78 0
The student 'Ali' has the total marks = 481
Enter Student name: Taher 72 67 -33 0
The student 'Taher' has the total marks = 139
Enter Student name: Ahmed 75 68 84 -18 90 0
The student 'Ahmed' has the total marks = 317
Exercise#2: Menu
Using a counter controlled nested do-while loop only, write a program to display the following pattern.
Sample input/ output:
Transcribed Image Text:Exercise#1: Number Sequence Using nested loops, continue and break, write a program that prompts the user to input data for five students. Each student's data contains student first name and test scores. The program should accept positive integers only for test scores and ignore non-positive integers. Each student may has a different number of test scores; the program should receive input for test scores until input "0". Finally, the program outputs each student name with the sum of his/her marks. Sample Input/Output: Enter Student name: Khaled 65 78 -40 56 -25 89 0 The student 'Khaled' has the total marks = 288 Enter Student name: Kamal 37 55 44 -77 22 18 56 26 0 The student 'Kamal' has the total marks = 258 Enter Student name: Ali 66 33 87 66 87 -25 25 39 78 0 The student 'Ali' has the total marks = 481 Enter Student name: Taher 72 67 -33 0 The student 'Taher' has the total marks = 139 Enter Student name: Ahmed 75 68 84 -18 90 0 The student 'Ahmed' has the total marks = 317 Exercise#2: Menu Using a counter controlled nested do-while loop only, write a program to display the following pattern. Sample input/ output:
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 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