Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me with this C program, please make it as simple as possible because I'm in programming 1 and I just started along with

Please help me with this C program, please make it as simple as possible because I'm in programming 1 and I just started along with using lots of comments.

Please don't use count or cin statements and please use #include. Can also use #include and #include if needed.

Here is the problem:

image text in transcribed

Here is the Algorithm, please make it look like very similar to the algorithm:image text in transcribed

Here is the names.txt file:

image text in transcribed

Please make it as simple as possible because I'm in programming 1 and I just started along with using lots of comments.

Please don't use count or cin statements and please use #include. Can also use #include and #include if needed.

Write a C program called transpose.c that reads in 15-20 family and friends (one first and last name on a line) or 15-20 computer game names (some need to have multiple words) from the file names.txt. Put the names into the array char names [20] [60]; (make sure the names are less than 59 characters each). Write the names out to the screen and to a file called trans.txt so the names can be read down instead of across and add a couple of spaces between each character across. Watch out for '\0' and ' ' characters! For example, Carol Joe R Neil becomes CJ N a o e re i 0 1 A R ... print "This program reads names from in.txt and writes them out downward in out.txt" open in, out files for each row for each column names [row][column] =" (set to blank) for each name read name into names [0] print to screen names [i] (just a good idea) print to file names [column][row] for each row number for each column number if names (column] [row]!= ' ' or != '\0' print names (column][row] else print' 'to screen print' 'to file print spaces print a newline close in and out Help names - Notepad File Edit Format View Spurs Raptors Celtics Seventy Sixers Nets Knicks Bucks Pacers Pistons Bulls Cavaliers Heat Magic Hornets Wizards

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

Step: 3

blur-text-image

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

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions