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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!