Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a C program. Finish incomplete code Reads user info from standar input, outputs modified versions of the records. INCOMPLETE CODE #include #define SIZE 10
Write a C program. Finish incomplete code
Reads user info from standar input, outputs modified versions of the records.
INCOMPLETE 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; }
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 s an integer literal, and wage is a floating point literal with up to 2 decimal number. See sample input below uses scanf S s s" name, age, wage) to read in three input 'strings where name, age and wage are of type charl201 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 ofinput, the first letter of name is capitalized age becomes age 10, and wage has 100% increases with 3 digit after decimal point, followed by the floor and ceiling of the increase wage. The values are separated by dashes as shown below. How to create resu?) then duplicate/copy resu to resu2 using a library function declared in string.h then duplicate/copy resu to resu3 using a library function declared inStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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