Question
Name your c++ file Triangle_LastNameFirstName.cpp. Read a set of characters (string) from a text file call word.txt and print out the string in the right
Name your c++ file Triangle_LastNameFirstName.cpp. Read a set of characters (string) from a text file call word.txt and print out the string in the right triangle form as shown below. Also, count the characters of the string and determine if the string length has an odd number or even number of characters. You can create your own text file and place in the proper folder. For instance, if the file contains the string "Program", its right triangle for the string will look like the below. Print in uppercase letters to the console for both outputs and back out to another file named UppercaseString_LastNameFirstName.dat". Be sure to have "quotes around the word like below
OUTPUT :
PROGRAM PROGRA PROGR PROG PRO PR P
MARGORP ARGORP RGORP GORP ORP RP P
The word "Program" has a length of 7 and has an odd number of character
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started