#include<iostream>
using namespace std;
int main()
{
int cock, hen, chicken;
for (cock = 1; cock < 20; cock++)
{
for (hen = 1; hen < 33; hen++)
{
chicken = 100 - cock - hen;
if (cock * 5 + hen * 3 + chicken / 3 == 100)
{
cout << cock << ' ' << hen << ' ' << chicken << endl;
}
}
}
return 0;
}
#include<iostream>
using namespace std;
int main()
{
int a, b, c;
for (a = 1; a <= 5; a++)
{
for (b = 1; b <= 5; b++)
{
for (c = 1; c <= 5 && a != b; c++)
{
if (c != a && c != b)
{
cout << "A:" << a << ' ' << "B:" << b << ' ' << "C:" << c << endl;;
}
}
}
}
return 0;
}
标签:std,includeusing,第一天,int,hen,cock,chicken From: https://www.cnblogs.com/daimazhishen/p/17321817.html