• API
• FAQ
• Tools
• Archive
SHARE
TWEET

# Untitled

a guest Jul 17th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. #include<stdio.h>
2. int main()
3. {
4.     float n,j;
5.     int t,x,q;
6.     scanf("%f", &n);
7.     printf("NOTAS:\n");
8.     x = (int)n;
9.     t = x / 100;
10.     printf("%d nota(s) de R\$ 100.00\n", t);
11.     x = x % 100;
12.     t = x / 50;
13.     printf("%d nota(s) de R\$ 50.00\n", t);
14.     x = x % 50;
15.     t = x / 20;
16.     printf("%d nota(s) de R\$ 20.00\n", t);
17.     x = x % 20;
18.     t = x / 10;
19.     printf("%d nota(s) de R\$ 10.00\n", t);
20.     x = x % 10;
21.     t = x / 5;
22.     printf("%d nota(s) de R\$ 5.00\n", t);
23.     x = x % 5;
24.     t = x / 2;
25.     printf("%d nota(s) de R\$ 2.00\n", t);
26.     printf("MOEDAS:\n");
27.     x = x % 2;
28.     t = x / 1;
29.     printf("%d moeda(s) de R\$ 1.00\n", t);
30.     j = n - (int)n;
31.     j = j * 100;
32.     q = (int)j;
33.     t = q / 50;
34.     printf("%d moeda(s) de R\$ 0.50\n", t);
35.     q = q % 50;
36.     t = q / 25;
37.     printf("%d moeda(s) de R\$ 0.25\n", t);
38.     q = q % 25;
39.     t = q / 10;
40.     printf("%d moeda(s) de R\$ 0.10\n", t);
41.     q = q % 10;
42.     t = q / 5;
43.     printf("%d moeda(s) de R\$ 0.05\n", t);
44.     q = q % 5;
45.     t = q / 1;
46.     printf("%d moeda(s) de R\$ 0.01\n", t);
47.
48.
49.
50. }
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.

Top