Hey guys, having trouble getting started on a task i have.
The task is to create a customer order system for an oil company who sells oil products to its customers. The customers are companies using the oil products in their machines or in their manufacturing processes.
basic requirements:
1. Product file with price and discount information. It should be possible to do
some basic maintenance of the file.
2. Customer file with customer information like customer number, name, adress etc.
It should be possible to do some basic maintenance of the file.
3. You should be able to enter customer orders and save them to a file, using the
stored product and customer information.
The program should be menu driven.
my foughts is to make a menu with 3 options as the 3 above. Then make 3 functions that will start if you choose it from the menu. i dont know if thats the right way to go but atleast ive said something about how im thinking. Im not that skilled on C yet.
Code:#include <stdio.h> #include <stdlib.h> //put in 3 functions...:/ its not much but it all ive got this far. if anyone wanna help me sort this one out i would be forever greatful. void main() { char pick; printf(" Menu\n ===\n"); printf("A. Products\n"); printf("B. Customer\n"); printf("C. Order\n"); printf("pick one: "); scanf("%c", &pick); switch (pick) { case 'A': printf("The function for the Products"); break; case 'B': printf("The function for the Customer"); break; case 'C': printf("The function for the Order"); break; default: printf("Wrong type in\n"); break; } }



LinkBack URL
About LinkBacks





really nice