[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 215
  • Last Modified:

for loop

I am a student learning C now, I was given a homework . I spent 3 whole days on it but i still  could not figure out. this program is about to write 3-D arrays, class, student and quizz, after input 27 grades, this program should print out the average as follwing:

class1
the average for student 1 is XX
the average for student 2 is XX
the average for stident 3 is XX

class2
the average for student 1 is XX
 :    :           :     2   :
 :    :           :         :
class 3
 :    :

The average in class 1 is XX
:     :         :    2   :
:               :    3   :

the total average  for all classes is XX


My problem is that I could not do this printout loop and average, I appreciate if you could show me how to do it without using function call.

thank in advance

Keqin Mao
My instructor did not teach us too much about array, and our textbook is not good for reference.
0
kemao
Asked:
kemao
  • 3
  • 2
1 Solution
 
q2guoCommented:
Can you email me the exact question please?
my email is q2data@yahoo.com.
I will get back to you in one hour.
0
 
julio011597Commented:
Not very kind: as an expert, you should know the difference between comments and answers, shouldn't you?
0
 
q2guoCommented:
Sorry, but nowdays to get some points,  this is what you have
to do.
0
Easily manage email signatures in Office 365

Managing email signatures in Office 365 can be a challenging task if you don't have the right tool. CodeTwo Email Signatures for Office 365 will help you implement a unified email signature look, no matter what email client is used by users. Test it for free!

 
rsjettyCommented:
Yes , your this can be done very easily. All it requires is simple set of for loops.
My assumption is that we know the No of Students , No of Classes and No of Quizes before hand.
Your total report consists of three individual reports , which are
(1)Average of each student grouped by class
(2)Average of each class
(3)Average of all the classes
Each of the above mentioned reports requires 3 "for" loops , nested within each other.Thus you require 9 "for" loops in all.
for more info get back to me.- rsjetty
0
 
julio011597Commented:
q2guo

i'm not a policeman, so take the following as just my opinion:

i do appreciate your sincerity, but please keep in mind that, first, you locked a question without an answer, second, you asked for direct contact via e-mail; both actions are violations of the expected experts' behaviour; if you keep acting this way, you will find yourself alone.
0
 
q2guoCommented:
Julio
I will try not to let this happen again.
Sorry, if I made some people unhappy.
0

Featured Post

Managing Security & Risk at the Speed of Business

Gartner Research VP, Neil McDonald & AlgoSec CTO, Prof. Avishai Wool, discuss the business-driven approach to automated security policy management, its benefits and how to align security policy management with business processes to address today's security challenges.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now