Campus Management (I)

Assume a campus of FAST-NU having 3 Departments each with 3 Sections in which there are 50 Students. Your task is to manage a record of Marks of all the students of that campus as under:

D e p a r t m e n t : S e c t i o n : S t u d e n t M a r k s Department : Section : Student --- Marks

For Example: 3:2:5---71.33 means that marks of a student numbered 5 of section 2 from department 3 are 71.33.

Here is a sample data set. Let s be the section number of department d with highest average. What is s + d s+d ?

Details and Assumptions:

  • s and d are non-negative integers

  • Marks of each student are from 0.00 to 100.00 .


this problem is a part of the set Fundamental Programming


The answer is 4.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Zeeshan Ali
Jan 6, 2016

A simple 3D-Array, say My_Arr[departments][sections][students] , can be used to store the marks such that the given example is equivalent to: M y A r r [ 3 ] [ 2 ] [ 5 ] = 71.33 MyArr[3][2][5]=71.33 Calculate the average of all the sections of all the departments then find the maximum average among them.

I will provide the complete algorithm later :)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...