Escolar Documentos
Profissional Documentos
Cultura Documentos
int numrec=0 void welcome()
struct job int opt
char fname printf("\t\t\t Welcome to Job Records ")
20
20
char device printf("\t\t\t Option #1:NewRec Records \n")
20
50
50
int number scanf("%d",&opt)
char stat system("cls")
10
input opt
exit(0)
void RecEdit() system("pause")
welcome() void NewRec()
0 numrec++
input[numrec-1].ID=numrec+1400
printf("Enter Job rst name:")
scanf("%s",input[numrec-1].fname)
ush(stdin) Prompting to enter last name
printf("Enter Job last name:")
scanf("%s",input[numrec-1].lname)
ush(stdin) Prompt to enter phone number
printf("Enter the client phone number:")
scanf("%d",&input[numrec-1].number)
ush(stdin) Prompt to enter Job device
printf("Enter the name of the Job device:")
scanf("%s",input[numrec-1].device)
ush(stdin) Prompt to enter device model
printf("Enter device model:")
scanf("%s",input[numrec-1].model)
ush(stdin) Prompt to enter replacement
part
printf("Enter the replacement part:")
scanf("%s",input[numrec-1].repart)
ush(stdin) Prompt to enter cost
replacement part
printf("Enter cost of the replacement part:")
scanf("%f",&input[numrec-1].recost)
ush(stdin)
printf("Record Successful Added")
void RecDisplay()
int i
system("cls")
printf("\t\t\t Displaying Information \n")
i=0
i<=numrec-1
False True
int i printf("\t\t\t ID: %d \n",input[i].ID)
i=0 printf("\t\t\t Job Name: %s %s\n",input[i].fname,input[i].lname)
printf("\t\t\t Phone Number: %d\n",input[i].number)
i <3 printf("\t\t\t Device: %s\n",input[i].device)
True False
scanf("%s",input[numrec-1].fname) (cid>=1400)&&(cid<=numrec+1400)
False True
printf("Enter Job last name:") printf("Enter 1 to edit :First Name \n")
scanf("%s",input[numrec-1].lname) printf("Enter 2 to edit :Last Name \n")
printf("Enter the client phone number:") printf("Enter 4 to edit :Job device \n")
scanf("%d",&input[numrec-1].number) printf("Enter 5 to edit :Device model \n")
printf("Enter the name of the Job device:") printf("Enter 7 to edit :Cost of the replacement part \n")
scanf("%s",input[numrec-1].device) scanf("%d",&edopt)
Prompt to what the model of Prompt to enter what the
printf("Enter device model:") Prompt to what the phone printf("Change %d \n",input[cid-1401].number) printf("Update %s to- \n",input[cid-1401].lname) Prompt to what the device printf("Change %s \n",input[cid-1401].device) Prompt to what the name will printf("Change %s \n",input[cid-1401].fname) printf("Change %s \n",input[cid-1401].model) printf("Change %s \n",input[cid-1401].repart)
the device will be changed replacement part will be
number will be changed to will be change to be changed to
to changed to
7
Prompt to enter what the
scanf("%f",&input[numrec-1].recost) printf("Change $%.2f \n",input[cid-1401].recost) cost of the replacement part
will be changed to
ush(stdin) printf("TO-")
system("cls") scanf("%f",input[cid-1401].recost)
i++ system("cls")
printf("Record Successfully Updated\n")
printf("Cost of replacement for %s has been changed to $%.2f \n",input[cid-1401].fname, input[cid-1401].recost)
printf("That option does not exist")
RecEdit()
https://code2flow.com/app 1/1