{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Assignment1

# Assignment1 - The mean of the marks is 51 The standard...

This preview shows page 1. Sign up to view the full content.

Department of Computer Science The University of Hong Kong CSIS1117A Computer Programming Assignment 1 Due Date: Sept 25, 2009. (11:59pm) You may assume all input are valid in these exercises. 1. Tom takes 4 courses in his study. Write a program to find the mean and standard deviation of his marks. ( ) 4 3 2 1 4 1 a + a + a + a = m ( ) ( ) ( ) ( ) [ ] 2 4 2 3 2 2 2 1 4 1 m a + m a + m a + m a = s Your program will read 4 marks from the console input ( cin ), and display the mean and standard deviation on the console output ( cout ). Sample run of the program: c:>markstat Enter the 4 marks: 75 68 34 27
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: The mean of the marks is 51 The standard deviation is 20.7966 2. Given a 3-digit number, write a program to find the sum of the 3 digits. Sample run of the program: c:>sumdigits Enter a 3-digit number: 276 The sum of the 3 digits is 15. Notice: 1: Marks distribution: Q1: 40%, Q2: 40%, Style: 20%. 2: Please just hand in source code file (.cpp). The filename of Q1: “assignmentOneA.cpp” and The filename of Q2: “assignmentOneB.cpp”. 3: The statement “system ("PAUSE")” should be removed....
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern