he following program declares à 485afra epresents a student, and each column represents a student's lab grade. For example row 0, which has he values (44.5, 0, 100, 66, 77), represents five lab grades for the first student. The ollowing program also prints the array on 4 lines. / program 4 include Int main () float StudentLabs[4] [5]= ((44.5, 0, 100, 66, 77), {55.4, 12.2, 0.5, 99, 70), (88.1, 33.88, 22, 29.55, 59.1), (99, 88, 77, 66, 55}}; int i, j; printf("\t\tGrades\t\t\tlt\tMax\n"); for (i-0; i<4; i++) printf("Studentid\t", i); for (j= 0; j<5; j++) printf (".2r\t", StudentLaba (1) (3]) : printf("\n");

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
The following program declares a 4x5array and initializes its elements upon declaration. Each row
represents a student, and each column represents a student's lab grade. For example row 0, which has
the values (44.5, 0, 100, 66, 77), represents five lab grades for the first student. The
following program also prints the array on 4 lines.
// program #4
#include<stdio.h>
int main ()
float StudentLabs [4] (5]- {{44.5, 0, 100, 66, 77),
{55.4, 12.2, 0.5, 99, 70},
(88.1, 33.88, 22, 29.55, 59.1),
(99, 88, 77, 66, 55}};
int i, j;
printf("\t\tGrades\t\t\t\t\tMax\n");
for (i=0; i<4; i++)
printf("Studentid\t", i);
for (j- 0; j<5; j++)
printf("8.2f\t", StudentLabs (i) [j]);
printf("\n"};
return 0:
1. Modify the program so that it calculates the maximum grade for each student (i.e. the maximum
value in each row) and prints the result at the end of each row. The output should look as
follows:
Grades
Мах
Studento
44.50 0.00 100.00 66.00 77.00
100.00
Student1
55.40 12.20 0.50 99.00 70.00
99.00
Student2
88.10 33.88 22.00 29.55 59.10
88.10
Student3
99.00 88.00 77.00 66.00 55.00
99.00
Transcribed Image Text:The following program declares a 4x5array and initializes its elements upon declaration. Each row represents a student, and each column represents a student's lab grade. For example row 0, which has the values (44.5, 0, 100, 66, 77), represents five lab grades for the first student. The following program also prints the array on 4 lines. // program #4 #include<stdio.h> int main () float StudentLabs [4] (5]- {{44.5, 0, 100, 66, 77), {55.4, 12.2, 0.5, 99, 70}, (88.1, 33.88, 22, 29.55, 59.1), (99, 88, 77, 66, 55}}; int i, j; printf("\t\tGrades\t\t\t\t\tMax\n"); for (i=0; i<4; i++) printf("Studentid\t", i); for (j- 0; j<5; j++) printf("8.2f\t", StudentLabs (i) [j]); printf("\n"}; return 0: 1. Modify the program so that it calculates the maximum grade for each student (i.e. the maximum value in each row) and prints the result at the end of each row. The output should look as follows: Grades Мах Studento 44.50 0.00 100.00 66.00 77.00 100.00 Student1 55.40 12.20 0.50 99.00 70.00 99.00 Student2 88.10 33.88 22.00 29.55 59.10 88.10 Student3 99.00 88.00 77.00 66.00 55.00 99.00
Expert Solution
steps

Step by step

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