Select a favorite topic. Write a program that asks for names and some attribute of the item (see below). Use a WHILE loop to continue to get input. When the user is finished entering information, display some arithmetic information about what they entered.
Don't just replicate this same idea, think of something creative to do with your program.
Enter a fruit: appleWhat color is it (R)ed, (Y)ellow, (O)ther? RDo you want to add more (Y/N)? YEnter a fruit: bananaWhat color is it (R)ed, (Y)ellow, (O)ther? YDo you want to add more (Y/N)? YEnter a fruit: cherryWhat color is it (R)ed, (Y)ellow, (O)ther? RDo you want to add more (Y/N)? YEnter a fruit: grapeWhat color is it (R)ed, (Y)ellow, (O)ther? ODo you want to add more (Y/N)? NYou entered 4 altogether.There were 2 red fruits.There were 1 yellow fruits.There were 1 fruits that were neither red nor yellow.
What to submit:
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here