/* * tourstruct1.c * Create a struct data type */ #include int main(void) { struct check // Header for the new structre called check { char payto[30]; char date[20]; int chknum; float amount; }; // Declare and initializes 2 variables of type check struct check chk1 = {"Turgut Derman", "January 13, 2004", 37, 34.95}; struct check chk2 = {"Mark Morales", "January 15, 2004", 38, 50.10}; printf("NAME\t\tDATE\t\t\tCHECK_NUMBER\tAMOUNT\n"); printf("%s\t%s\t%d\t%.2f\n", chk1.payto, chk1.date, chk1.chknum, chk1.amount); printf("%s\t%s\t%d\t%.2f\n", chk2.payto, chk2.date, chk2.chknum, chk2.amount); printf("TOTAL OF CHECKS ISSUED:%.2f\n", chk1.amount + chk2.amount); return 0; }