can someone please help me with programming (c++)
lemme see it
one sec
have to follow this flow chart
looking at this you got 2 variable and 2 conditions
you there?
yes
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 }
i didnt use any editor so check dont copy and paste
okay leh me see if i can fix it lol
do u have the formula to compute the windchill?
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
how is it going/?
with the coding
goin complicated zzz
lol
aight let me open my visual studio
can you program it for me looll this thing is due in 15 min omgg...
i dont know the formula for windchill lol
ill try the program and let u compute that
hmm
// 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; }
try this
okay question when ir compiles are we suppose to enter a number?
yes
so what would we enter ?
any number
just run the programm i wrote
okay itworked xD
Join our real-time social learning platform and learn together with your friends!