#include<stdio.h>
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{ //数学问题
int x = 1, y = 1;//x晴y阴 晴天和阴天至少各为1天
while (x < 10)
{
y = 11 - x;
if (35*x+28*y==350)
{
printf("%d %d", x, y);
}
x++;
}
return 0;
}
实际上,计算机是从x=1开始一个个尝试,直到取得满足条件的x , y
而不能这样,让计算机帮我们解
这样语法也不正确