but i dont understand how it works :)
Type: Posts; User: anchorblue804
but i dont understand how it works :)
I am designing a simple plinko game program. Basically I am stuck on exactly how to make this unfold. How to randomize the odds of where it hits(rand() % 2)???? and how to keep it going and the...
Yeah I know, but how do I do that in code? I'n new ha
This is my code. I have everything done but this requirement. At one point the user inputs to have their results sorted by either "gas" consumption or "total" cost. SO how would I print: If the users...
So I am designing a simple program. You input a bunch of numbers to compare a hybrid car and its costs vs a normal car and its costs. I am stuck on these two things.
AS OUTPUTS
1.A label...
Here is my code so far. I just can't get the last 3 lines. I need to accept only text that says Total or Gas. How would I do that? I've looked up and read a lot of stuff but everything I tries...
thanks !
Pretty new to programming. It runs but it doesn't display the error message: Please enter a positive number. Any suggestions? This is just the fragment that won't go.
do
{
cout <<"The...
How about this?
int hybrid_cost = 0;
do
{
cout <<"The cost of a hybrid car?" << endl;
cin >> hybrid_cost;
}
while ( ! ( 0 < hybrid_cost ) );
I need to verify that all numerical input is positive. If not, output an error message that only positive numbers are valid and reprompt one more time. I have looked around, but am pretty confused....
I have finished other elements of the program, but I am not sure where to go on this one. Yes I am a beginner. I don't know how to perform these divisions with leftovers and such and how to make it...