I need help to write a program that reads a text file, specified by the user, li
ID: 3545192 • Letter: I
Question
I need help to write a program that reads a text file, specified by the user, line by line. The program will count blanks, digits, volwes, and determine whether or not a line is a palindrome. write functions to determine each of the above. each of the functions should receive a string and each function except for the palindrome function should return an integer.There sould be no input or output within the functions. meaningful variable names and pronpmts are required. All variables used must be local and all loops used must be for loops. The blank count, digit count and vowel count should be printed at the end. The palindromes should be printed as they are encountered. Thank you!
Explanation / Answer
#includeusing namespace std;int main(){ int n, num, digit, rev = 0; cout > num; n = num; for(int num ; num!=0; (num/10)) { digit = num%10; rev = (rev*10) + digit; num = num/10; } coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.