Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions

Question

Question What is the advantage of a voluntary DBO plan?

Answered: 1 week ago