This is an individual assignment. You must complete this lab on your own, although you may discuss lab concepts with other students. Please keep the Academic Integrity Policy in mind---do not show your code to anyone outside of the professors and ninjas, and do not look at anyone else's code for this lab. If you need help, please post a question on Piazza, or contact the professor.
The goal of this lab is to introduce you to basic concepts in the C++ program language. Concepts you will be familiar with after this lab include:
Create a new project called lastname_PrgAsst1. When submitting your assignment on onCourse, you should submit a .zip file of the entire folder for the project.
In this lab, you will write a program that counts the number of syllables in a word entered by the user. Your program should ask the user to write a single word, all in lower case letters, and then display the number of syllables in that word. You can assume that the user will enter an input that makes sense.
The counting of syllables should be done according to the following rules. Note that the rules are not foolproof, it is possible to find words in the English language for which the rules will not give the correct answer, but in the interest of keeping this assignment reasonably short and doable, we will stick to the following:
For example:
On input "syllable", your program should display the number 3.
On input "absent", your program should display the number 2.
On input "sometimes", your program should (mistakenly) display the number 3.
On input "wiequtbaooooopiie", your program should display the number 3.
On input "fffffffffffffffffffffffffffffffffff", your program should display the number 1.
Completing the assignment above is sufficient to receive full marks for this programming assignment. However, if you are in the mood to spend a lot of time just to get an extra 5% bonus, here's an extra challenge.
Create a new project called lastname_PrgAsst1C. When submitting your assignment with the challenge on onCourse, you should submit a .zip file of both project folder.
Write a program that asks the user to enter three (3) lines, each possibly containing multiple words, and then displays whether or not those three lines form a Haiku. You will have to first break each line into words, then use the code from the previous project to count the number of syllables in each word. Feel free to copy-paste any of your code from the previous project.
For example, on input:
haikus are easy but at times they dont make sense refrigeratoryour program should display that this is a Haiku.
i dont know how to do this challenge but it sure sounds funyour program should display that this is not a Haiku.
Enjoy!
This problem is based off of problem 8183 from the ICPC live archive.