Tuesday, June 24, 2014

Learning C++ in N Questions

Hello

H01 Can you print out "hello world"?
H02 Can you ask user a number and then print out "hello 1", "hello 2", ..., "hello n"?
H03 Can you stop the program on each loop and examine the number n?

Statistics

M10 Can you ask user for n numbers and calculate the average?
M11 Can you ask user for n numbers and calculate average, max, min?
M12 Can you read in a file of numbers, count how many numbers, and calculate average, max, min?
M13 Can you also count how many numbers are above the average?

M21 Can you print these numbers from small to large?
M23 Can you print the "median" of these numbers?

Customer

You have a customer file, each line has a customer name and the balance.  
C30 Can you create a customer object and calculate average balance?
C31 Can you print the customers from small balance to large balance?
C32 Can you print the customers alphabetically?
C33 Can you print the customer with median balance?

C41 Can you find a specific customer and print his balance?
C42 Can you change a customer's balance?
C43 Can you add another customer to the customer file?
C44 Can you delete a customer and recalculate the statistics?

Q&A

No comments:

Post a Comment