SHARE
TWEET

Untitled

a guest Mar 26th, 2020 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. int main()
  3. {
  4.   float i,j=0;
  5.   int a,b=0;
  6.   scanf("%f",&i);
  7.   a=i;
  8.   if(a<=1000000.00)
  9.   {
  10.   printf("NOTAS:\n");
  11.   printf("%d nota(s) de R$ 100.00\n",a/100);
  12.   printf("%d nota(s) de R$ 50.00\n",(a%100)/50);
  13.   printf("%d nota(s) de R$ 20.00\n",((a%100)%50)/20);
  14.   printf("%d nota(s) de R$ 10.00\n",(((a%100)%50)%20)/10);
  15.   printf("%d nota(s) de R$ 5.00\n",((((a%100)%50)%20)%10)/5);
  16.   printf("%d nota(s) de R$ 2.00\n",(((((a%100)%50)%20)%10)%5)/2);
  17.   j=((i*100)-(a*100));
  18.   b=j;
  19.   printf("MEODAS:\n");
  20.   printf("%d moeda(s) de R$ 1.00\n",((((((a%100)%50)%20)%10)%5)%2));
  21.   printf("%d moeda(s) de R$ 0.50\n",(b/50));
  22.   printf("%d moeda(s) de R$ 0.25\n",(b%50)/25);
  23.   printf("%d moeda(s) de R$ 0.10\n",((b%50)%25)/10);
  24.   printf("%d moeda(s) de R$ 0.05\n",(((b%50)%25)%10)/5);
  25.   printf("%d moeda(s) de R$ 0.01\n",((((b%50)%25)%10)%5));
  26.   }
  27.   return 0;
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top