#include#include using namespace std; void grading(int b); int main() { int count=0; for(int i=0;i<=100;i++){ for(int j=0;j<=50;j++){ for(int k=0;k<20;k++){ if(i+2*j+5*k==100){ count++; } } } } cout << "共有" << count << "种换法。" << endl; //忽略阅读 //忽略阅读结束 return 0; }


![[c++期末刷题]将 1 元钱换成 1 分、2 分、5 分的硬币 [c++期末刷题]将 1 元钱换成 1 分、2 分、5 分的硬币](http://www.mshxw.com/aiimages/31/511855.png)
