{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HES1300 Lab 6 - Swinburne University of Technology(Sarawak...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Swinburne University of Technology (Sarawak Campus) School of Engineering, Computing and Science 2014, Semester 2 HES1300 Robotics & Mechatronics Project 1 (C Programming) Lab 6 - Functions Task 1 - Creating void functions Write a program to read 5 integer numbers from user. Calculate the sum and aver- age of the 5 numbers. Display the result to the console window. The program should repeat the steps until the user decided to exit the program. 1. Declare a 1-dimensional array of type integer with 5 elements. 2. Use a do-while loop to repeat the processes. 3. Read the user input and assign to the array by using a for loop. 4. Calculate the sum and average of the array. 5. Write a function,  printHeader()  to print the header as shown. ------------------------------------------ HES1300 Robotics & Mechatronics Project 1 Lab 5 – Modular programming
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}