c++

4396y 发表于 1年前 · 关联问题 计算人数

include "pch.h"

include

using namespace std;

int main() {

int renshu = 30; int moneny = 50;

for (int i = 0; i < 30; i++) { for (int j = 0; j < 30; ++j) { for (int n = 0; n < 30; ++n) { if (i*3+2*j+n==moneny) { printf("%d %d %d\n",i ,j,n); } } } }

}