-1

hi , i have this assignment but i don't know how to find the structured ? the program needs to use the structure that stores the following data:
Drink Name
Drink Cost
Number of Drinks in Machine
and we need to create an array of 5 structure with this:
Drink Name Cost Number in Machine
Coca-Cola .75 20
Root Beer .75 20
Sprite .75 20
Spring Water .80 20
Apple Juice .80 20

and how to create an imput file ?
please help meee

i have this ...idon't know if is correct and not finisheddd

#include <cstdlib>
#include <iostream>

using namespace std;
// Array drinks
const int Drinks = 25;

// the costs structure holds data about the costs.
struct costs
{
  double Coca-cola;
  double RootBeer;
  double Sprite;
  double Spring-Water;
  double Apple-juice;
};

// the drinksInfo structure hold an drinks data.
struct drinksInfo
{
   char name[NAME_DRINKS];
   int Costs;
   int DrinksTypes;
   int NumofMachine;
};
   
int main(int argc, char *argv[])
{

Edited by __avd: Added [code] tags.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by daviddoria
0

You look like you're off to a good start. Once you get some more of the details filled in, if you have any specific errors or questions let us know.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.