hey dude,
I need help regarding my project. Its about creating a program of a vending machine. It said i must include these in the vending machine system menu
a) Replenish the system
b) Buy Drinks
c) Transaction Report
d) Quit
>> Enter Choice : X
I wish to know what i should do, what a vending machine program include or any websites to help me with. Thanks. Hoping for a reply.

Recommended Answers

All 4 Replies

Hi everyone,
i am not very sure what you need to do but here is most of the main part of the program

#include<stdio.h>
#include<math.h>
#include<Ctype.h>
#include<Conio.h>
Void main(void)
{
char a;
printf("a. Replenish the system\n");
printf("b. Buy Drinks\n");
printf("c. Transaction Report\n");
printf("d. Quit\n");
printf("Enter Choice :  ");
fflush(stdin);
scanf("%c",&a);
switch(a)
{
case 'a'://Do what you want
break;
case 'b'://Do what you want
break;
case 'c'://Do what you want
break;
case 'd':exit(0);
break;
default://Do what you want
break;
}
}

Yours Sincerely

Richard West

haha thanks thanks .. but i got a problem ... the C++ i learnt in sch taught us to use using namespace std; #include <iostream.h> isit a very old format ? or it is a more useful tag than using namespace std; ??

eRmz and oh if u guys need to take a look of the actual question of the project u can find it in the attachment. Well thanks . I think i will carry on with the program .. :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.