Hi, i just started c++ programming in college this semester, and i have a project that i have no idea how to do. Im sure it will be extremely simple to all of you experts, but i just cant think of a way to do it. Maybe some of you could guide me in writing this program?
These are the instructions:
Write a program to translate input text into pig latin. The translation can be done character by character, without using string variables. The program skips non-alphabetic characters until it comes to an alphabetic character, which will be the first character of a word. If this character is a vowel, it reads and writes out the word with "ay" at the end. If the first character of the word is not a vowel, it writes out the word without its first character, and adds the original first character of the word plus "ay" at the end. Any blanks and punctuation marks should not be counted as part of a word, but should be written just as they are read. The program continues until an end of file(EOF) is read.
Use the principles of top-down design. Use the following functions as part of your program:
Skip_Non_Word() -- reads and writes blanks and punct. marks, and returns the first alphabetic character it finds.
Read_Word() -- reads and writes alphabetic characters, and returns the first non-alphabetic character it finds.
Is_Vowel() -- returns 1 if the character is a vowel, and 0 otherwise.
make sure your code handles end-of-file gracefully(without getting stuck in a loop)
DUE DATE: April 5
p.s. Thank you for your time
p.p.s. I am using visual c++ 6, and it must be a console program