S:=(k div 100) + ((k mod 100) div 10)+(k mod 10);
#include <iostream>
#include <cmath>
using namespace std;
void mod(int &mas, int j)
{
cin >> mas;
mas = mas / pow(2, j);
}
int main()
{
int mas[3];
int min;
for (int jjj = 0; jjj < 3; jjj++)
{
mod(mas[jjj], jjj);
if (jjj == 0)
min = 0;
else if (mas[min] > mas[jjj])
min = jjj;
};
cout << mas[min] + mas[min] * 2 + mas[min] * 4;
}
Вторая схема, так как АЕ = 1; ЕС=2 и так далее. В первом графике эти данные не совпадают.
Начинаешь закрашивать со стеночки а потом таким же темпом циклом НЦ ПОКА СВЕРХУ СНИЗУ ЗАКРАШЕНО ВЛЕВО ВПРАВО)
Using System;
namespace Cars{ public enum Direction { Left, Right }
public class TurnEventArgs : EventArgs { public TurnEventArgs(Direction direction) { Direction = direction; }
public Direction Direction { get; } }
public abstract class Car { public event EventHandler Started; public event EventHandler Stopped; public event EventHandler<TurnEventArgs> Turned;
public int Speed { get; set; } public string Color { get; set; } public string Name { get; set; } public virtual bool IsPolice => false;
public void Go() { Started?.Invoke(this, EventArgs.Empty); }
public void Stop() { Stopped?.Invoke(this, EventArgs.Empty); }
public void Turn(Direction direction) { Turned?.Invoke(this, new TurnEventArgs(direction)); } }
public class TownCar : Car { }
public class SportCar : Car { }
public class WorkCar : Car { }
public class PoliceCar : Car { public override bool IsPolice => true; }}