Assignment1

Assignment1 - 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

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

View Full Document Right Arrow Icon
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
Background image of page 1
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

This document was uploaded on 05/04/2011.

Ask a homework question - tutors are online