write a c program to print the transaction number,energy cost,energy units,rural electrification tax for the 5th customer of day 2 of November 2021. create tripple pointer for above customer
#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