И тогда:
a: b/3 × а = 30/3 × 8 = 10 × 8 = 80ответ: 80
1)
#include <iostream>
using namespace std;
int main()
{
int g, k, n=64;
for (g=0; g<=n; g++)
{
for (k=0; k<=n/2; k++)
{
if (2*g + 4*k == n)
{
printf ("Gycu - %d. \nKpoluk - %d.\n\n", g, k);
}
}
}
return 0;
}
2)#include <iostream>
using namespace std;
long double fact(int N)
{
if(N < 0)
return N;
if (N == 0)
return 1;
else
return N * fact(N - 1);
}
int main()
{
int N, M;
setlocale(0,"");
cout << "N=";
cin >> N;
cout<<"M=";
cin>>M;
cout<<"N!-M!=" << fact(N)-fact(M) << endl << endl;
return 0;
}
b= 6+3*8= 6+24=30
a=30/3*8=10*8=80