13 /* Hauptbildschirm ausgeben */
17 printf("C128-Kassenprogramm\n\n");
18 printf("Eingenommen: %.2d Euro, Verkauft: %d Flaschen\n\n", money * 100, items_sold);
19 for (; i < NUM_ITEMS; ++i)
20 printf("Item %x: %s (%d Cents, %d mal verkauft)\n", i, status[i].item_name, status[i].preis, status[i].times_sold);
21 printf("\nBefehle: s) Save Data\n");
24 /* Wird ausgelagert */
29 static uc einheiten = 1;
31 if (status[n].item_name == NULL)
32 printf("ERROR: No such item\n");
34 printf("Wieviel Einheiten \"%s\"?\n", status[n].item_name);
39 else if (c > 47 && c < 58)
40 einheiten += (c - 48);
42 status[n].times_sold += einheiten;
43 money += status[n].preis * einheiten;
44 items_sold += einheiten;
51 status[0].item_name = "cola";
52 status[0].preis = 230;
53 status[0].times_sold = 0;
54 status[1].item_name = "mate";
55 status[1].preis = 150;
56 status[0].times_sold = 0;
57 for (c = 2; c < NUM_ITEMS; ++c)
58 status[c].item_name = NULL;
60 /* Bildschirm anzeigen */
62 /* Tastatureingaben abfragen */
64 /* und eventuell weitere Dialoge anzeigen */