Errors in Code

Can someone point out the errors in this code please?

#include <iostream>
using namespace std;

int main()
{
int change = 0;

cout << “Please enter amount of change in your pocket, using format 0.53 : “
cin >> change;

if (change = 0)
{
cout >> “Your pockets are empty!!” << endl;
}
else if (change >= 1);
{
cout << “You have over a dollar!! << change << endl;
} else (change < 0)
{
cout << “You have “ << change << “ in your pocket” << endl;
}

}
That is your homework. Try to remember what syntactic rules you have been shown so far.

You could try to compile the code; the compiler will list problems that it sees. (That would obviously change your challenge from "regognize problems" to "understand what the compiler say".)
Did you copy the code from a book?
cout << “Please enter amount of change in your pocket, using format 0.53 : “

This line does not compile. The code is missing a semi-colon (;) and more importantly, C++ only accepts this type of double-quotation sign (") not this (“).
Exactly the same code? Coincidence much?
http://www.cplusplus.com/forum/beginner/198770/
Topic archived. No new replies allowed.