[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
The temperature in an apartment must be kept between 18°C and
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 19
Thread images: 1
File: savage.jpg (60 KB, 500x500) Image search: [Google]
savage.jpg
60 KB, 500x500
The temperature in an apartment must be kept between 18°C and 20°C. If the
temperature reaches 22°C then the fan is switched on; if the temperature reaches
16°C then the heater is switched on, otherwise the fan and the heaters are switched
off.
>>
>>51241589
The following library routines are available:
• GetTemperature
• FanOn
• FanOff
• HeaterOn
• HeaterOff
Write an algorithm, using pseudocode or a flowchart, to keep the temperature at
the right level.
>>
>>51241589
>>51241596
do your own homework
>>
>>51241618
fuck that
>>
If you're this program illiterate, you may as well just quit while you're ahead, or pay someone to do it for you.
>>
please tell me you can do this yourself.
>>
>>51241701
>>51241669
im testing /g/ , :'^)
>>
>>51241589
fans don''t actually cool a room
>>
>>51241589

IF hot THEN cool it down
IF cold THEN heat it up
ELSE do nothing

psuedocode is easy!
>>
>>51241716
> fans don't actually cool a room
kek m8
>>
>>51241589
>The temperature in an apartment must be kept between 18°C and 20°C
Alright
>If the temperature reaches 22°C
Can't happen. Apartment must be kept between 18°C and 20°C
>if the temperature reaches 16°C
Also can't happen. Apartment must be kept between 18°C and 20°C
>>
>>51241776
>Apple temperature management unit
>simply leaves any room not conforming to the configured temperature range
>>
>>51241589

if (GetTemperature > 15)
if GetTemperature < 21)
HeaterOn
FanOff
else
FanOn
HeaterOff
else
FanOff
HeaterOff
>>
>>51241748
No, he's right, unless you open a window, fans will add to the temperature. Law of thermodynamics and all that.

What it does do is make you feel colder by moving the air around you.

Also, I wish my freaking homework was this easy. First year CS, and I'm failing (40%). Got a test on Monday, worth 15%. I'm fucked.
>>
>>51241589
Why use pseudocode when you can just make a state machine? You don't need a computer for this.
>>
>>51241875
Everything is better with computers.
>>
>>51241873
>What it does do is make you feel colder by moving the air around you.
feels good senpai
>>
>>51241748
How can fans be real if our eyes aren't real?
>>
void getsCalledEverySecond {
if(getTemperature() >= 22) {
HeaterOff(); //to make sure
FanOn();
} else if(getTemperature() <= 16 ) {
FanOff(); //to make sure
HeaterOn();
} else {
HeaterOff();
FanOff();
}
}
Thread replies: 19
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.