If input 0 then num1 is 5 else num1 is input number.
#include
int
main ( )
{
int num1;
std::cin >> num1;
num1 || (num1 = 5);
std::cout << num1 << std::endl;
return 0;
}
If input 0 then num1 is 0 else num1 is always 5.
#include
int
main ( )
{
int num1;
std::cin >> num1;
num1 && (num1 = 5);
std::cout << num1 << std::endl;
return 0;
}
interesting.
0 件のコメント:
コメントを投稿