what is wrong with my coding?

#include <iostream>
using namespace std;
int main ()
{
float amount;
cin >> amount;
amount = amount*100+.0001;

float temp;
int i, j, k, l;
temp = amount; // Change variable temp (float) to amount (integer)
i = amount/25;

cin.get();
cout << i << "Quarters" <<endl;
i=temp%25;
j=i/10;

cout << j << "Dimes" << endl;
j=i%10;

k=j/5;
cout << k << "Nickels" << endl;
k-j%5;

l=k/l;
cout << l << "Pennies" << endl;

cin.get()
system ("pause")
return 0;

}
What are your errors?
16 G:\Untitled2.cpp invalid operands of types `float' and `int' to binary `operator%'
20 G:\Untitled2.cpp invalid operands of types `float' and `int' to binary `operator%'
24 G:\Untitled2.cpp invalid operands of types `float' and `int' to binary `operator%'
30 G:\Untitled2.cpp expected `;' before "system"
16 G:\Untitled2.cpp invalid operands of types `float' and `int' to binary `operator%'
20 G:\Untitled2.cpp invalid operands of types `float' and `int' to binary `operator%'
24 G:\Untitled2.cpp invalid operands of types `float' and `int' to binary `operator%'

That's because you cannot use the modulo operator(%) to get the reminder of dividing between a float and an int.

30 G:\Untitled2.cpp expected `;' before "system"

You should have brought a ";" after the previous statement.

**Tip** In order to be self reliant, you must be able/practice to understand compilation errors.--No offence.just helping.
Topic archived. No new replies allowed.