Jump to content

devolver o menor numero de dinheiro para uma compra inferior a 100 euros


msmsms

Recommended Posts

comecei por fazer assim:

alguém me pode ''orientar'' para resolver o que falta?

int main()
{
/*menor numero de moedas e de notas a devolver de troco para uma compra inferior a 100 euros*/
/*dinheiro*/
float n1=0.01;
float n2=0.05;
float n3=0.10;
float n4=0.20;
float n5=0.50;
float n6=1.00;
float n7=2.00;
float n8=5.00;
float n9=10.00;
float n10=20.00;
float n11=50.00;
float n12=100.00;
/*valor da compra*/
float total;
printf("total ");
scanf("%d", total);
}
Edited by msmsms
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.