Need some help

i need to write a program that takes info from a txt file and prints out the info in a chart form with the roomname, numadults, numchild, roomtype, roomcost, mealcost, discount, amount. And then it displays the totals of each at the bottom. i have no idea where to start. any help will be accounted for.
you start with pencil and paper and think about what your program will look like. Graph paper works best.

Then you decide what functions you are going to need. For example, one function here might be loadFile(fstream&), which loads the file into memory.

to store the memory efficiently you could use an array of structs:

1
2
3
4
5
6
7
8
9
10
11
struct ROOM_DATA
{
    std::string RoomName;
    int numadults;
    int numchild;
    char roomtype;
    float roomcost;
    float mealcost;
    int discount;
    int amount;
}


but this program is not supposed to use functions. it is just supposed to use for and while loops. basically the txt file has
H
80
6
S
M
15
0
D
E
30
2
S
M
23
7
D
S
54
3
S
O
72
2
D
H
85
0
S
O
54
9
S
and this is in the form of room name, # adults, # kids, and if it is a standard room or deluxe. the program is supposed to take the info from that and put it in a table. the room cost is a constant from the type of room chosen. and then the program calculates the cost for the meal, the discount (less than $500 - 1%, atleast $500 but less than $1000 - 2%, at least $1000 but less than $1500- 4% and $1500 or more - 5%) then fine the total amount, then below the table it calculates the total adults, child, room costs, meal costs, discount total and total amount.
Topic archived. No new replies allowed.