Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ANYONE COULD HELP ME ASAP. NEEDING HELP ON 1.2 and 1.3 (confusing instructions so I am not sure what to do). Here is my working

ANYONE COULD HELP ME ASAP. NEEDING HELP ON 1.2 and 1.3 (confusing instructions so I am not sure what to do).

image text in transcribedHere is my working code from the previous steps. PLEASE HELP and EXPLAIN 1.2 and 1.3. THANKKKKSS IN ADVANCE!

image text in transcribedimage text in transcribed

Instead of repeating the same code five times, you can use a loop to reduce the code length. Modify the program to use a 'for' loop to ask the user for a character. Use an input function such as getchar) to input the character. You should display a menu to the user such as Menu: d, y, m, t" each time the user is supposed to input a character. Submit the rewritten progranm Notes: 1) For-loops are supported in the C99 standard, so you must use the-std=c99 flag in your gcc command to compile a program using a for loop. Also note that C99 supports different functions, so some of your functions may need to be updated to a supported version. 2) You may need to call getchar() and then getc0 to flush the newline character left behind by the previous getchar); 3) You can fill in the table in question 2.2 while you are solving question1 1.3 Save the five input characters in a text file named inputdata.txt and save the output data into a text file outputdata.txt. Then, use input and output redirections to run the program so that it takes the inputs from file inputdata.txt and prints the output into the file outputdata.txt

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 Technology And Management Computers And Information Processing Systems For Business

Authors: Robert C. Goldstein

1st Edition

0471887374, 978-0471887379

More Books

Students also viewed these Databases questions