I'm fairly positive the issue is with my looping, I am still struggling with it. Although I just learned Branching, I'm fairly confident in my Branching and do not think the error is anything in the Branching.
I have a strong feeling that it has something to do with my "{ }"'s (my braces). I don't know if I put the wrong one in somewhere, or if I am missing one some where.
Would really appreciate the help from someone, thanks in advance!
//Taylor Lynch
//Taxi1
//Calculate the cab fare for a ride with the number of quarter-miles entered by the user
//Period 5
#include <iostream.h>
#include <conio.h>
#include <dos.h>
#include <stdio.h>
main()
{
textcolor(LIGHTCYAN);
textbackground(BLACK);
clrscr();
float qmiles, fare1;
cprintf(“Please enter the number of QUARTER MILES traveled: “);
cin>>qmiles;
if(qmiles<=1&&qmiles>=0)
{
cprintf(“Your total cab fare is $2.00”);
}
if(qmiles>1)
fare1=(qmiles-1)*.75+2;
cprintf(“Your total cab fare is $%o.2f. “, fare1);
}
if(qmiles<0
{
cprintf(“ERROR! Please enter a number larger than 0”);
}
getch();
return 0;
}