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

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

Swinburne University of Technology (Sarawak Campus) Faculty of Engineering, Computing and Science Semester 2, 2014 HES1300 Robotics & Mechatronics Project 1 (C Programming) Lab 4 – Control Structure - Repetition Task 1 - Create simple repetition structure Inches millimetres ----------------------------------------- 1.0 0 1.5 12.7 1.0 25.4 1.5 38.1 2.0 50.8 2.5 63.5 3.0 76.2 Figure 1 1. Generate a table of conversions from inches to millimetres as shown in figure 1 using while loop. Start the inches column at 0.0 and increment by 0.5 in. the last line should contain the value 3.0 in. ( 1 in = 25.4 mm ). 2. Create a new program to reproduce the result of step 1, by using for loop. Task 2 – create simple control structure Write a C program that reads 10 integer numbers from the user and then calculate the sum and average of the numbers entered. The program shall read only positive numbers (in-
Image of page 1

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

Image of page 2
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '14
  • Addition, Negative and non-negative numbers, Swinburne University of Technology

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern