Lab08-HorterAG.docx - Lab Assignment – 8 Amy Horter Due Date March 24th(11.59 pm Total Points 50 Objectives Learn to use loops in programming Learn to

Lab08-HorterAG.docx - Lab Assignment – 8 Amy Horter Due...

This preview shows page 1 - 4 out of 7 pages.

Lab Assignment – 8 Amy Horter Due Date: March 24 th (11.59 pm) Total Points: 50 Objectives: Learn to use loops in programming Learn to read input from a file using loops 1. Design a program using any type of loop that will ask the user to enter an integer number for 10 times. After the execution of the loop, your program should print the number of times an odd or even integer was entered. Assume that the user will not enter any wrong input but the integers every time. (10 points) 2. Design a simple program using while or Do-While loop that asks the user to enter his/her age (range between 1 to 120 years), then prints it back on the screen. Your program must check for type-safe and value safe inputs. (10 points)
Image of page 1

Subscribe to view the full document.

3. Design a program using While and For loop that should print the average of 5 integers. Your program should also print the highest value among the 5 integers. (10 points)
Image of page 2
4. Design and implement a program that reads the grades from the included text file – grades.txt and calculates the following and displays on the terminal window: (20 points) Count of all the students Average of all the grades Highest grade
Image of page 3

Subscribe to view the full document.

Image of page 4
  • Fall '17
  • Otto

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

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes