enter image description here

enter image description here

Please help, I don't know where the problem is.


When the type prefix is used, that's declaration. For example int cents;. The first error tells you that cents has been declared twice. (do not use int on subsequent instances of cents).

"initialization" means the (declared) variable has been set to something. Compiler is complaining that dollars has been declared (ie float dollars) but not set to anything (eg float dollars = 0;).

Beware, program is using two variables dollars (plural) and dollar. At a quick read, suggest you use one or the other, there is no need for both.

There may be other problems with the program, but these corrections should result in a successful compilation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .