Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- //?: demo and short scheme demo
- int main() {
- {
- int n = 13423432;
- while (n) {
- printf(n & 1 ? "Zero\n" : "One\n");
- n >>= 1;
- }
- }
- double x = 15;
- (x < 10) ? printf("Less\n") : printf("More\n");
- {
- int n = 19;
- n += (n % 2) ? 1 : 0; //Of course, we can use n & 1;
- }
- {
- int k = -10;
- (k > 0) || printf("Warning! k < 10\n");
- k && printf("k is not null!\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement