Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

eae Complete the ram with given t do Lhis Download file Jab4D.a and start from there. Note that the program uses loop to read inputs

image text in transcribedimage text in transcribed

eae Complete the ram with given t do Lhis Download file Jab4D.a and start from there. Note that the program uses loop to read inputs (from standard in), one input per line, about the user information in the form of name age wage, where name is a word (with no space), age is an integer literal, and wage is a floating point literal. See sample input below uses scant 4.6m where name, age and wage are of type charf20 . %s %s", wage) to read in three input "strings' * name, age, The program should, after reading each line of inputs, creates a char [40] string resu for the modified version of the input. in the modified version of input, the first letter of name is capitalized, age becomes age * 10, and wage has 100% increases with 3 digits after decimal point, followed by the floor and ceiling of the increase wage. The values are separated by dashes and brackets as shown below. Hint: 1) to convert to a float with 3 digits after decimal point, review the code of runningAvelocal.c provided in lab3. 2) To create resu from several variables, consider sprintf. 3) if you use math library functions, be aware that the return type is double then duplicate/copy resu to resu2 (how about strcpy or strcat) e using a library function declared in * then duplicate/copy resu to reau3 using a library function declared in (how about sprintf?) then output the resulting strings resu, resu2 and cesu e continue reading input, until a name xxx is entered [folowed by any two words). Output Enter nane, age and age xx to qust) lisa 30 1,34 Lisa-40-2.680-12.31 Lisa-40-2.690- [2.31 Ea-40-2.680-12, 31 Enter name, age and vage (xxx to quith: judy 40 3.2 udy-30-6.400-16,7 Judy-30-6.400-16,7 Judy-50-6.400-16,7 Enter nane, age and wage xxx to quit): xx2 2 Use this teaplateil detine SI2E 10 detine 31212 Complete the C program with given template: Download file Jab4D.a and start from there. Note that the program uses loop to read inputs (from standard in), one input per line, about the user information in the form of name age wage, where name is a word (with no space), age is an integer literal, and wage is a floating point literal. See sample input below uses scant 4.6m where name, age and wage are of type charf20 . %s %s", wage) to read in three input "strings' * name, age, The program should, after reading each line of inputs, creates a char [40] string resu for the modified version of the input. in the modified version of input, the first letter of name is capitalized, age becomes age 10, and wage has 100% increases with 3 digits after decinal point, followed by the floor and ceiling of the increase wage. The values are separated by dashes and brackets as shown below. Hint: 1) to convert to a float with 3 digits after decimal point, review the code of runningAvelocal.c provided in lab3. 2) To create resu from several variables, consider sprintt. 3) if you use math library functions, be aware that the return type is double then duplicate/copy resu to resu2 using a library function declared in then output the resulting strings resu, renu2 and cesu (how about strcpy or strcat) (how about sprint? e continue reading input, until a name xxx is entered [folowed by any two words). Output Enter nane, age and age xx to qust) lisa 30 1,34 LLsa-40-2.680-12.31 Lisa-40-2.680-12.31 5sa-40-2.680-12, 31 Enter name, age and wage (xxx to quit): judy 40 3.2 udy-30-6.400-16,7 Judy-50-6.400-16,7 Judy-50-6.400-16,7 Enter name, age and wage xxx to quit): xx2 2 Use this teaplatei define 31212

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

Students also viewed these Databases questions