Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Add your self as customer, set customer number to your student number, and set your balance to be equal to the first two digit of
Add your self as customer, set customer number to your student number, and set your balance to be equal to the first two digit of your student ID followed by the last 2 digits in TL
Ex: my student ID id 1903060053
then my balance is 1953
B) Create the following list of prducts products
1. RAM, 23, 12%.
2. CPU, 230,17%.
3. VGA,200, 15%.
C) Calculate the total price for all products using loop
D) Insert order related to you that contains at least two product by copying priduct from the created product list to the order product array.
E) print your information followed by your order information, and the balance.
#include
#include
#define SIZE 10
struct Product {
unsigned productNumber;
char *productName;
double price;
double kdv;
double totalPrice;
};
struct Customer {
char firstName[15];
char lastName[15];
unsigned int customerNumber;
double balance;
};
struct Order {
struct Customer customer;
struct Product product[SIZE];
};
void calculatTotalPrice(struct Product *product);
void printProduct(struct Product product);
void printOrderInfo(struct Order order);
void calculateBalance(struct Order *order);
int main(int argc,char **argv){
Step 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