Блог пользователя Martuza

Автор Martuza, 11 лет назад, По-английски

There is a saying that it takes 10,000 hours of doing something to master it. Twelve Tips to Master #Programming

Полный текст и комментарии »

  • Проголосовать: нравится
  • -14
  • Проголосовать: не нравится

Автор Martuza, 11 лет назад, По-английски

Sometimes we use flag variables for indicating some operations. and we need to change the value of flag 0 to 1 or 1 to 0. we use this statements

bool flag = 1;
if(flag == 1) flag = 0;
else flag = 1;

But how I get same result not using these statements? Have any mathematical calculation for this ? Please anyone help me.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -18
  • Проголосовать: не нравится