Ask your own question, for FREE!
Mathematics 20 Online
OpenStudy (marcelie):

can someone please help me with programming (c++)

OpenStudy (518nad):

lemme see it

OpenStudy (marcelie):

one sec

OpenStudy (marcelie):

OpenStudy (marcelie):

have to follow this flow chart

OpenStudy (karim728):

looking at this you got 2 variable and 2 conditions

OpenStudy (karim728):

you there?

OpenStudy (marcelie):

yes

OpenStudy (karim728):

so basically cout<<"Please Enter the Temperature" cin>> temp cout<<"Please Enter the Windspeed" cin>> windspeed if((temp>-58)&& (Temp <41) && (Windspeed >= 2)){ //computation for windspweed } else if((Windspeed < 2){ //display valid windspeed } else{ // display invalid temp }

OpenStudy (karim728):

i didnt use any editor so check dont copy and paste

OpenStudy (marcelie):

okay leh me see if i can fix it lol

OpenStudy (karim728):

do u have the formula to compute the windchill?

OpenStudy (marcelie):

well it states a formula from the previous chapter ttwc = 35.74 +0.6215 ta - 35.75 v^0.16 + 0.4275t a v^0.16

OpenStudy (karim728):

how is it going/?

OpenStudy (karim728):

with the coding

OpenStudy (marcelie):

goin complicated zzz

OpenStudy (karim728):

lol

OpenStudy (karim728):

aight let me open my visual studio

OpenStudy (marcelie):

can you program it for me looll this thing is due in 15 min omgg...

OpenStudy (karim728):

i dont know the formula for windchill lol

OpenStudy (karim728):

ill try the program and let u compute that

OpenStudy (marcelie):

OpenStudy (marcelie):

hmm

OpenStudy (karim728):

// ConsoleApplication2.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]){ double temp,windspeed; cout <<"Please Enter the Temperature"; cin>>temp; cout <<"Please Enter the windspeed"; cin>>windspeed; if((temp>-58)&& (temp <41) && (windspeed >= 2)){ //computation for windschill and display it double twc= 35.74 + 0.6215 *temp * pow(windspeed,0.16) + 0.4275 * temp * pow(windspeed,0.16); cout<<"The windchill is " << (twc); } else if((windspeed < 2)){ cout<<"invalid windspeed"; } else{ cout<<"invalid temperature"; } system("pause"); return 0; }

OpenStudy (karim728):

try this

OpenStudy (marcelie):

okay question when ir compiles are we suppose to enter a number?

OpenStudy (karim728):

yes

OpenStudy (marcelie):

so what would we enter ?

OpenStudy (karim728):

any number

OpenStudy (karim728):

just run the programm i wrote

OpenStudy (marcelie):

okay itworked xD

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!