
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Practice Exercise FlowCharts
1. Print all even numbers between 1 to 100. 2. Ask user input for a number. Check if it is a prime number. If it is, end the program but if it is not ask for the user input again till the user enters a prime number. 3. Print a table of numbers from 1 to 8. 4. One way to estimate the adult height of a child is to use the following formula, which uses the height of the parents: All heights are in inches. Write a flowchart that takes as input the gender of the child, the height of the mother in inches, and the height of the father in inches, and outputs the estimated adult height of the child in inches. The program should allow the user to enter a new set of values and output the predicted height until the user decides to exit. The user should be able to input the heights in feet and inches, and the program should output the estimated height of the child in feet and inches. 5. It is difficult to make a budget that spans several years, because prices are not stable. If your company needs 200 pencils per year, you cannot simply use this year’s price as the cost of pencils two years from now. Because of inflation, the cost is likely to be higher than it is today. Create a flowchart to gauge the expected cost of an item in a specified number of years. The program asks for the cost of the item, the number of years from now that the item will be purchased, and the rate of inflation. The program then outputs the estimated cost of the item after the specified period. Have the user enter the inflation rate as a percentage, such as 5.6 (percent). Your program should then convert the percent to a fraction, such as 0.056, and should use a loop to estimate the price adjusted for inflation. 6. Serendipity Booksellers has a book club that awards points to its customers based on the number of books purchased each month. The points are awarded as follows: - If a customer purchases 0 books, he or she earns 0 points. - If a customer purchases 1 book, he or she earns 5 points. - If a customer purchases 2 books, he or she earns 15 points. - If a customer purchases 3 books, he or she earns 30 points. - If a customer purchases 4 or more books, he or she earns 60 points. Create a flowchart that asks the user to enter the number of books that he or she has purchased this month and displays the number of points awarded. 7. Create a flowchart to find the smallest integer n such that n^2 is greater than 12,000. 8. Ask the user to enter marks and credit hours of five subjects. Display the GPA. 9. Ask the users to enter numbers until he enters -1. Calculate and display the count of even numbers entered by user.