Question: Need help Writing this Program in C: Create an interactive program using 1 struct, 2 counting loops, and an array of structs. You will be

Need help Writing this Program in C:
Create an interactive program using 1 struct, 2 counting loops, and an array of structs. You will be using two
strings within your struct. The character arrays should not include white space.
Create a program that stores customers information in an array.
Please refer to the struct below.
You will not be implementing a function.
Assume that you have 5 customers.
Use a counting loop to take in the customers name, order amount, and the location of the order.
Set the order number of each customer to be the order of input. For example, the first customer entered into the
program will have an order number of 1. The second customer entered into the program will have an order
number of 2.
After taking in the customers information, use another counting loop to ask the user if they would like to access
one of their customers information, you will locate the customer based on the order number.
Display the selected customers information onto the screen. Continue to ask the user until they enter N or n.
Please refer to the example output.
typedef struct {
char OrderName [50]; //stores the first name of the customer
int OrderNumber; //stores the order number of the customer
double OrderAmount; //stores the order amount
char location[100]; //stores the customers location
} customer;
Example output:
Welcome to your order tracker.
Please enter your customer's information:
The order number for this order is 1
Please enter the name of the order: Toph
Please enter the order amount: 23.45
Please enter the location of purchase: Gaoling
The order number for this order is 2
Please enter the name of the order: Iroh
Please enter the order amount: 295.67
Please enter the location of purchase: Basingse
The order number for this order is 3
Please enter the name of the order: Yue
Please enter the order amount: 345.67
Please enter the location of purchase: North
The order number for this order is 4
Please enter the name of the order: Appa
Please enter the order amount: 999.99
Please enter the location of purchase: Iceberg
The order number for this order is 5
Please enter the name of the order: Pakku
Please enter the order amount: 89.90
Please enter the location of purchase: North
Would you like to access one of your customer's information? Enter 'Y' for yes or 'N' for no: y
Please enter the order number of the customer:3
Name of the order:Yue
Order amount: $345.67
Location of the order: North
Would you like to access another customer's information? Enter 'Y' for yes or 'N' for no: y
Please enter the order number of the customer:2
Name of the order:Iroh
Order amount: $295.67
Location of the order: Basingse
Would you like to access another customer's information? Enter 'Y' for yes or 'N' for no: n
GoodbyeCreate an interactive program using 1 struct, 2 counting loops, and an array of structs. You will be using two
strings within your struct. The character arrays should not include white space.
Create a program that stores customers' information in an array.
Please refer to the struct below.
You will not be implementing a function.
Assume that you have 5 customers.
Use a counting loop to take in the customer's name, order amount, and the location of the order.
Set the order number of each customer to be the order of input. For example, the first customer entered into the
program will have an order number of 1. The second customer entered into the program will have an order
number of 2.
After taking in the customers' information, use another counting loop to ask the user if they would like to access
one of their customer's information, you will locate the customer based on the order number.
Display the selected customer's information onto the screen. Continue to ask the user until they enter 'N' or 'n'.
Please refer to the example output.
typedef struct {
char OrderName [50]; //stores the first name of the customer
int OrderNumber; //stores the order number of the customer
double OrderAmount; //stores the order amount
char location[100]; //stores the customer's location
} customer;
Example output:
Welcome to your order tracker.
Please enter your customer's information:
The order number for this order is 1
Please enter the name of the order: Toph
Please enter the order amount: 23.45
Please enter the location of purchase: Gaoling
The order number for this order is 2
Please enter the name of the order: Iroh
Please enter the order amount: 295.67
Please enter the location of purchase: Basingse
Please enter the order amount: 345.67
Please enter the location of purchase: North
The order number for this order is 4
Please enter the name of the order: Appa
Please enter the order amount: 999.99
Please enter the location of purchase: Iceberg
The order number for this order is 5
Please enter the name of the order: Pakku
Please enter the order amount: 89.90
Please enter the location of purchase: North
Would you like to access one of your cus
Need help Writing this Program in C: Create an

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!