Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

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 And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions