Weekly project 3 (1) (2) -- multi-subject transcript

Source: Internet
Author: User

Weekly project 3 (1) (2) -- multi-subject transcript

/* Copyright (c) 2014, School of Computer Science, Yantai University * All rights reserved. * file name: test. cpp * Author: Chen Danni * completion date: December 02, 2014 * version No.: v1.0 ** Problem description: score of a certain class, make a transcript and use a two-dimensional array score [] [4] To save the scores of high numbers, English, and c ++, and obtain the highest score, lowest score, and average value. * Description: Number of Students and score. * Program output: Output transcript */# include
 
  
# Include
  
   
Using namespace std; void input (double s [] [4], int n); // input result void output (double s [] [4], int n ); // output result double max (double s [] [4], int n, int I); // calculate the highest score of the I course, I = 3 is the total value of double min (double s [] [4], int n, int I ); // calculate the lowest score of the Class I, double avg (double s [] [4], int n, int I ); // calculate the average score of the I course. int main () {int I, num; string temp; double score [100] [4]; // set up a maximum of 100 persons in a class. The actual string course [4] = {"Advanced Mathematics", "English", "C ++", "total score"} according to the input "}; cout <"Number of students:"; cin> num; // (1) enter the score and obtain the total score input (score, num); // (2) output score output (score, num); // (3) output the maximum score, lowest score, average score, and standard deviation of each course and total score; for (I = 0; I <4; ++ I) {cout <
   
    
S [I] [0]> s [I] [1]> s [I] [2]; s [I] [3] = s [I] [0] + s [I] [1] + s [I] [2];} void output (double s [] [4], int n) // output score {cout <"the input Student Score is:" <
    
     
S [I] [j]) m = s [I] [j]; return m;} double avg (double s [] [4], int n, int j) {double sum = s [0] [j]; for (int I = 1; I
     
      

Learning Experience: In general, the beginning is very complicated, but if you solve small problems one by one, this question will be much better.

Don't be intimidated by problems. Solve them one by one, from top to bottom, and gradually improve.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.