Variables Worksheet #3 | Name - |
Day of Week - |
Find and describe as many syntax, logic, and coding errors as you can. Label each error that you do find as either a compile error ( C ), a logic error ( L ), or a Coding Standards violation ( V ) and describe the error with a phrase.
// Mr. Minich
#include
#include <cstdlib>
using namespace std;
main()
{
// *************** variable declarations
*******************
const double tax = 0.06; //
tax rate
double p, z;
int q = 0;
// declaring variable q of
data type int
cout << "The price is " << p;
cout << "The quantity is " <<
q << endl;
cout << "The PA sales tax rat is " << tax << endl;
a = p*q * t;
// *************** displaying output ***********************
cout<<"The total cost is"
cout << a << endl;
system("pause");
return 0;
}