Question: 1.1 Specification Write an ANSI-C program that reads input from the Standard Input, and then outputs the reformatted versions of the input. 1.2 Implementation You

 1.1 Specification Write an ANSI-C program that reads input from the

1.1 Specification Write an ANSI-C program that reads input from the Standard Input, and then outputs the reformatted versions of the input. 1.2 Implementation You can download the file hello.c and use it as a template. name your program lablA.c use scanf to read input (from Standard Input), which are in the form of Month Day Year i.e., three integers separated by white spaces) use printf to generate output in the format of Year/month/day and Year-month- day display the following prompt (leave a white space after the colon) Enter month, day and year separated by spaces: display output as follows The input 'x xx xxxx' is reformatted as x/xx/xxx and x-xx-xxx Note: you should do the reformatting only within printf. In particular, you should use at most three variables, and feed them into printf judiciously. 1.3 Sample Inputs/Outputs: red 306 % gcc lab1A.c red 307 % a.out Enter month, day and year separated by spaces: 3 20 2019 The input '3 20 2019' is reformatted as 2019/3/20 and 2019-3-20 red 308

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!