Wyo C++ - Ch. 5 Worksheet #3 | Name - |
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
// Wyo C++
// Ch. 5 Demo Program #10
//
// Purpose - This program demonstrate several kinds of errors in a C++ program.
#include
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;
return 0;
}