Guest User

Untitled

a guest
Jan 12th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. The shortest code to tell if a number is even or odd [migrated]
  2. main(i){scanf("%d",&i);puts("dispari"+3*(~i&1));}
  3.  
  4. main(i){scanf("%d",&i);puts("dispari"+3-i%2*3);}
  5.  
  6. main(i){scanf("%d",&i);puts("dispari"-~i%2*3);}
  7.  
  8. main(){puts("dispari"-~getchar()%2*3);}
Add Comment
Please, Sign In to add comment