lab5 (108)

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> #include<cmath> using namespace std; int main() { setlocale(LC_ALL, "ru"); int const SUMA = 100; int b, k, t; for (b = 0; b < SUMA / 10; b++) { for (k = 0; k < (SUMA - b * 10) / 5; k++) { t = round((SUMA - b * 10 - k * 5) / 0.5); if ((b * 10 + k * 5 + t * 0.5 == SUMA) && (b + k + t == 100)) { cout << "Быков - " << b << endl << "Коров - " << k << endl << "Телят - " << t << endl; } } } return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines