Please help with my code!

This is what I have so far:

// code
[output]#include <iostream>
#include <string>
#include <iomanip>
#include <fstream>

using namespace std;

int GetNumRooms();
int 1 to numRooms;
int GetLength(room);
int GetWidth(room);
int balloons = length + width + BUNCH;
void WriteRoomData(int streamers, int lights, int balloons);

const string streamers = 2 * (length + width) * STR_COVERS;
const string lights = 2 * (length + width) * LT_COVERS;

int main()
for (int room = 1; room <= numRooms);
cout << "How many rooms? " << endl;
int numRooms;
int for room;
int length;
int width;
int streamers;
int lights;
int balloons;

numRooms = GetNumRooms();
length = GetLength(room);
width = GetWidth(room)
streamers = 2 * (length + width) * STR_COVERS;

cout << "How many rooms? " << endl;
cout << "What is the length of room: " << endl;
cout << "What is the width of room: " << endl;;

outFile << "90" << endl;

return 0;
// code

I need help writing a program that calculates the cost of decorating several rooms for a party. I need to provide the number of rooms to be decorated and the dimensions of the rooms (length and width of each room). Each room will take 1 and half feet of streamers to cover a foot of wall space. Each room will be decorated using three different colors of streamers. Each room will also be decorated with strings of lights. One and a quarter foot of lights cover one foot of wall space. Each wall should have one string of lights. Each room will also be decorated with balloons. The balloons will be placed two feet apart all the way around the room. A bunch of six will be strung together in the center of the room.

Output the raw data for each room to an output file “p4a.dat”. The data for each room should be output on a single line with the values separated with whitespace. The data should specify the length of streamers needed for each color (just one value), the length of lights needed, and the number of balloons. The file should contain a line of three values for each room processed.

Output File contents:
90 75 36
156 130 58
105 87.5 41
180 150 66
Last edited on
Please edit your post with codetags (highlight your code and click the "<>" under "Format") and explain exactly what you're trying to do and what you need help on.

you need to specify data types for your function prototypes.
for example this int GetLength(room); should be this
int GetLength(int room);

you can't use length outside of main where it was declared

balloons was declared twice once in main and one as a global variable this is a bad practice

also these are wrong int 1 to numRooms; and int for room;
Last edited on
Topic archived. No new replies allowed.