大学C++编程题
大学C++编程题
日期:2016-11-21 16:48:44 人气:1
1
#include
using namespace std;
int main()
{
int weight1,weight2,weight3,weight4,d1,d2,d3,d4,x,flag; /*flag:满足题意的标记*/
cout<<"砝码分为以下4块:";
for(weight1=1;weight1<=40;weight1++) /*将40分解成4份*/
for(weight2=weight1+1;wei