If Statements? What’s wrong with it?
I’ve done an if statement before in a previous program but it was numbers …
Code:
void process()
{
total=float(miles_after - miles_before)*0.42f;
if (total>=1000);
{
total=total+10.84;
}
}
But now I’m trying to do it with text and it doesn’t seem to be working. When I run the program the text appears weather my statement is true or flase.
Code:
void output()
{
printf("Your new balance is %2.f\n",updated_current);
if(updated_current<0);
{
printf("We would like to make you aware you have entered your over draft.");
}
}
Help much appreciated!
Chris