int square(int x, int y) {
if (x < 0 || y < 0) {
return -1;
}
else
{
return x * y;
}
}
int main(void)
{
int result = square(-2, 5);
if (result == -1) {
cout << "некорректный ввод \n";
}
else {
count << result;
}
}
canvas.addEventListener("touchmove", function(e) {
const q = 1;
const centerw = sheet.width/2;
sheet.emitter.x = centerw-(centerw-e.touches[0].clientX)/q;
const centerh = sheet.height/2;
sheet.emitter.y = centerh-(centerh-e.touches[0].clientY)/q;
})
display: flex
, flex-direction: row-reverse
, flex-wrap: wrap
. А самим блокам flex: 1 0 50%;
. Вникай во флексы и все получится. z-index
не забудь и transition
. По клику на левую все наоборот. Тут тебе ненужны никакие сторонние слайдеры. Все положения прописываешь в css, у тебя их пять. Потом на js задаешь нужный класс каждому элементу и они сами переместятся. <div>
<div>CREATIIVES</div>
<div class="sub-title">
<div>S</div>
<div>U</div>
<div>B</div>
<div>-</div>
<div>T</div>
<div>I</div>
<div>T</div>
<div>L</div>
<div>E</div>
</div>
</div>
.sub-title {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}
<template id="ticket">
<div class="ticket">blabla</div>
</template>