Skip to content

Instantly share code, notes, and snippets.

@OPhamster
Last active July 30, 2017 13:25
Show Gist options
  • Save OPhamster/fb6add04afcb4e375ed098b2c9075553 to your computer and use it in GitHub Desktop.
Save OPhamster/fb6add04afcb4e375ed098b2c9075553 to your computer and use it in GitHub Desktop.
Definition to check for positive integer
// check if integer is greater than zero or not
// this function returns true when a!=0 ie if (a<0 || a>0)
// this is not a good check for positive integers
// I realize this is not a good example - but for the sake of argument
bool check_if_positive(int a){
return bool(a)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment