Automated Fruit Selling Machine

Friday 3 May 2013

All of us are all familiar with the way a market runs. There are people who sells foods and there are people who buys. Before when we buy something, sellers use a calculator to compute how much are we going to pay. Nowadays, sellers use computers for a faster transactions.

In the streets, automatic machines are also out everywhere giving you instant foods and drinks. One example of this machine is the soda machines, where you'll just insert a coin and automatically it will drop your choice of food or drink.

My idea is this, I thought that some of us love fruits, so some of us are always going to the market to buy some. Some hate delays because they're busy, so some of us depend on automatic vending machines. Now, the program that I will introduce to you today is the combination of the two ideas I have. It is called the Automated Fruit Selling Machine. This program is used for selling fruits easily. In the machine chosen fruits are all indicated and its prices. All you need to do is choose which fruit you would like to have, how many you would like to take and then the machine will automatically compute how much you need to pay and after that you can then get your orders.

The program is used with switch case statement for easier handling. Switch case statement is more user friendly when you need to make a wide variety of choices in your program. Check the codes below.



   1:  #include <stdio.h>
   2:  #include <conio.h>
   3:  #include <stdlib.h>
   4:   
   5:  int mango=0;
   6:  int apple=0;
   7:  int orange=0;
   8:  int durian=0;
   9:  int q1,q2,q3,q4;
  10:  main()
  11:  {
  12:  int order;
  13:  char a;
  14:   
Related Posts Plugin for WordPress, Blogger...