Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~4K People Reached
Favorite Forums
Favorite Tags
c++ x 21
Member Avatar for JHus00

I need to convert hours into weeks, days, and hours. My professor was hinting that there might be a way to do this using the modulus operator but I can't seem to think of a way that its possible. Can anyone help? thanks!

Member Avatar for cereal
0
4K
Member Avatar for JHus00

Hey everyone. I want to call dateConversion and send along the date string which I do with this "dateConversion(dateString);" I want that to print the month day and year. I will have to do it at this line "cout << "on " << date << endl << endl;". When I …

Member Avatar for Nick Evan
0
130
Member Avatar for JHus00

[CODE]#include <cstdlib> #include <iostream> #include <fstream> using namespace std; double average(int sum, int numElms) { int i; double avg; avg = sum/numElms; return sum; } int main() { ifstream fileIn; const int MAX_ARRAY = 500; int scores[MAX_ARRAY]; int numElms, sum; int i; fileIn.open("pgm5data.txt"); //open file if (fileIn.fail() ) { cout …

Member Avatar for jonsca
0
129
Member Avatar for JHus00

[CODE]if (windspeed <= -40 && windspeed <= 40) { windchill = calculate(temp, windspeed); output(temp, windspeed, windchill); } else cout << "Error, please enter a number between -40 and 40 for temperature";[/CODE] I need to check to make sure a number, windspeed, is between -40 and 40. Can I do this …

Member Avatar for Ancient Dragon
0
89
Member Avatar for JHus00

[CODE]//function example #include <iostream> #include <cmath> using namespace std; float cutoff(float& windchill) { int z; z = (int)(windchill + 0.5); return(z); } float calculate (int& t, int& v) { float windchill; windchill = 35.74 + (0.6215 * t) - 35.75 * pow(v,0.16) + 0.4275 * t * pow(v,0.16); return(windchill); } …

Member Avatar for HealBrains
0
109
Member Avatar for JHus00

I need to make this formula c++ compatible, ive spent quite a while trying to figure this out, looking for some help! WindChill = 35.74 + 0.6215T - 35.75(V^0.16) + 0.4275T(V^0.16) Thanks!

Member Avatar for JHus00
0
88
Member Avatar for JHus00

I want to call the input function, which works when I run it, but then I want to display the "temp" and "windspeed" variables in the main function and I don't know how to do this, im looking online at tutorials but im still confused. I guess I shouldn't have …

Member Avatar for Fbody
0
185
Member Avatar for JHus00

It wont compile! I know something is probably wrong with my if condition but im unsure of what. [CODE]if (weight > 200) shipping_cost = 49.95; else if (weight >= 100 & < 200) shipping_cost = 39.95; else if (weight >= 50 & < 100) shipping_cost = 24.95; else if (weight …

Member Avatar for JHus00
0
109