Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > The Zelaron Nexus > Science and Art > Tech Help

 
 
Thread Tools Display Modes

 
C++ help
Reply
Posted 2006-10-28, 04:10 PM
I have to write a c++ programe that calculate how much paint cans you need to paint a rooms. each rooms have about 12 feet x 10 feet with 8 foot ceilings. each room contains 4foot x 5 foot window and a 3 foot x 7 door. in programe i have to ask the user how much door and windows in room. Can anyone help me
Old
Profile PM WWW Search
osmoses-jones is neither ape nor machine; has so far settled for the in-betweenosmoses-jones is neither ape nor machine; has so far settled for the in-between
 
osmoses-jones
 



 
Reply
Posted 2006-10-28, 04:12 PM in reply to osmoses-jones's post "C++ help"
How big an area can each paint can paint? And is it just the walls you paint?
Old
Profile PM WWW Search
Lenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basics
 
 
Lenny
 



 
Reply
Posted 2006-10-28, 06:41 PM in reply to Lenny's post starting "How big an area can each paint can..."
Seems rather straightforward. What exactly do you seem to be having problems with? And like Lenny said, how much area can the cans paint?
Old
Profile PM WWW Search
Demosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to beDemosthenes seldom sees opportunities until they cease to be
 
Demosthenes
 



 
Reply
Posted 2006-10-30, 05:09 PM in reply to Demosthenes's post starting "Seems rather straightforward. What..."
here lab teacher gave us i don't know how to start it up.

Old
Profile PM WWW Search
osmoses-jones is neither ape nor machine; has so far settled for the in-betweenosmoses-jones is neither ape nor machine; has so far settled for the in-between
 
osmoses-jones
 



 
Reply
Posted 2006-10-31, 09:37 AM in reply to osmoses-jones's post starting "here lab teacher gave us i don't know..."
Sure he didn't tell you how big an area each can paints?

It could be that a can paints 175 square feet, or it could be that the second wasn't fully used as both paint 200 square feet.

I don't know C++, but if it was done in VB you'd declare your variables, right? I guess that there is a similar thing done in C++?
Old
Profile PM WWW Search
Lenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basics
 
 
Lenny
 



 
Reply
Posted 2006-10-31, 09:50 AM in reply to Lenny's post starting "Sure he didn't tell you how big an area..."
Ya your teacher needs to tell you the coverage of a paint can. By that information, a can of paint could cover 349 square feet of room.

Damn I wish I was back at this level... *sigh*

Anyhow, for your program, you'll have something like this. (This is just pseudocode; don't copy it straight, because it won't work)

int totalarea
int doorarea
int windowarea
int paintablearea
int numdoors
int numwindows
int numcans

totalarea = 8 * 10 * 12

cout << how many doors?
cin >> numdoors
doorarea = numdoors * 3 * 7

cout << how many windows?
cin >> numwindows
windowarea = numwindows * 4 * 5

paintablearea = totalarea - (doorarea + windowarea)

numcans = ceil(paintablearea / WHATEVER A CAN PAINTS)
cout << The number of cans you'll need is << numcans
D3V said:
This message is hidden because D3V is on your ignore list.
What is it they say about silence being golden?
Old
Profile PM WWW Search
Medieval Bob enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzMedieval Bob enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
Medieval Bob
 



 

Bookmarks

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules [Forum Rules]
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 12:49 AM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.