Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
Starter Code: #include #define SIZE 10 #define SIZE2 40 int main(int argc, char *argv[]) { char name[SIZE], wage[SIZE], age[SIZE]; char resu[SIZE2], resu2[SIZE2], resu3[SIZE2]; printf(Enter name,
Starter Code:
#include
#define SIZE 10 #define SIZE2 40
int main(int argc, char *argv[]) {
char name[SIZE], wage[SIZE], age[SIZE]; char resu[SIZE2], resu2[SIZE2], resu3[SIZE2]; printf("Enter name, age and wage (xxx to quit): "); scanf("%s %s %s", name, age, wage); while () {
/* use scanf to read again */ } return 0; }
4.1 Specification Develop an ANSI-C program that reads user information from the standard inputs, and outputs the modified version of the records. 4.2 Implementation Download file lab4D.c 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 scanf ("%s where name, age and wage are of type char[20] . %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 using a library function declared inStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started