
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
use while loop and iostream domain only

Transcribed Image Text:Write a C++ program that prompts the end-user to input the number of students in a particular
program/specialization and number of courses for each student in this specialization. The
program shall let the end-user to enter the marks that each student gained in each of the
courses, individually, and calculate the average of each student. The output may look something
like the following screenshots. The first screenshot assumes that the number of students in the
program is 2, number of courses for student-1 is 3, and number of courses for student-2 is 5. If
the end-user input a mark below 0 and above 100 by mistake, a suitable message (as in the
second screenshot) should be displayed asking the end-user to input a valid value.
Sample input / output:
Enter the number of students in the program 2
Enter the number of courses for student-1 3
Enter the mark of course-1: 45
Enter the mark of course-2: 54
Enter the mark of course-3: 34
student-1 average is 44.3333
Enter the number of courses for student-2 5
Enter the mark of course-1: 39
Enter the number of students in the program 2
Enter the number of courses for student-1 3
Enter the mark of course-1: -1
Enter a valid mark
Enter the mark of course-1: 101
Enter a valid mark
Enter the mark of course-1:
Enter the mark of course-2: 87
Enter the mark of course-3: 67
Enter the mark of course-4: 56
Enter the mark of course-5: 45
student-2 average is 58.8
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 2 images

Knowledge Booster
Similar questions
- Which file lists files that Git should not track?arrow_forwardProvide the correct c++ code for below code /****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include using namespace std; #include int hextodec(char num[]) { int len = strlen(num); int base = 1; int temp = 0; for (int i=len-1; i>=0; i--) { if (num[i]>='0' && num[i]='A' && num[i]arrow_forwardThe index.html filename is important for a number of reasons.arrow_forward
- file:///Users/raulmelchoryulogarbanzos/Library/Group%20Containers/6N38VWS5BX.ru.keepcoder.Telegram/appstore/account-5097119293733531334/postbox/media/telegram-cloud-photo-size-5-6163672227954929351-y.jpgarrow_forwardAssume the following: TLB Page Table Set # Way #0 Way #1 Way #2 Way #3 0: V=Y;Tag=0x2aPPN=0x1c V=Y;Tag=0x2bPPN=0x29 V=Y;Tag=0x2cPPN=0x25 -- VPN PPN V? 0x0e 0x21 Y 0x0f 0x01 Y 0x10 0x38 Y 0x11 0x20 Y 0x12 0x3d Y 0x13 - - 0x14 - - 0x15 0x08 Y VPN PPN V? 0x16 0x1d Y 0x17 0x27 Y 0x18 - - 0x19 0x15 Y 0x1a 0x16 Y 0x1b 0x26 Y 0x1c - - 0x1d 0x36 Y VPN PPN V? 0x1e 0x10 Y 0x1f 0x3f Y 0x20 0x34 Y 0x21 0x09 Y 0x22 0x1b Y 0x23 0x2d Y 0x24 0x18 Y 0x25 0x39 Y VPN PPN V? 0x26 0x12 Y 0x27 0x22 Y 0x28 0x3a Y 0x29 0x00 Y 0x2a 0x1c Y 0x2b 0x29 Y 0x2c 0x25 Y 0x2d - - The memory is byte addressable. Memory accesses are to 1-byte words (not to 4-byte…arrow_forwardWhat about the txt file that saves and records the data that is imputted?arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY

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 Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science

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
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education

Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY