Write a program to print the transaction number,customer name, cost of energy, energy units, rural electrification tax for the fifth customer of day 2 November.
Create a triple pointer for the above customer's energy and print it
#include <stdio.h>
struct customer {
int transaction_number;
char *name;
double cost_of_energy;
int energy_units;
double elec_tax;
};
void print(const struct customer &customer) {
printf("transaction number: %d\n", curtomer.transaction_number);
printf("customer name: %s\n", customer.name);
printf("cost of energy: &f\n", customer.cost_of_energy);
printf("energy units: %d\n", customer.energy_units);
printf("elec tax: %f\n", customer.elec_tax);
}
int main() {
struct customer *customer = new struct customer();
print(customer);
return 0;
}
Comments
Leave a comment