C++ 代码
#include<bits/stdc++.h>
using namespace std;
int main(){
double M;
cin>>M;
int N = M*100;
int money[12] = {10000,5000,2000,1000,500,200,100,50,25,10,5,1};
char s[20] = "nota(s) de R$";
char s2[20] = "moeda(s) de R$";
cout<<"NOTAS:"<<endl;
for(int i = 0; i < 12 ; i++){
printf("%d %s %.2lf\n",N/money[i],s,money[i]/100.0);
N = N % money[i];
if(i == 5){
cout<<"MOEDAS:"<<endl;
strcpy(s,s2);
}
}
}