Skip to content

Instantly share code, notes, and snippets.

@juanfal
Last active September 30, 2025 11:19
Show Gist options
  • Save juanfal/e6333a1de084b92ee95211613a21f525 to your computer and use it in GitHub Desktop.
Save juanfal/e6333a1de084b92ee95211613a21f525 to your computer and use it in GitHub Desktop.
comparisons concatenation
// 02.concatbool.cpp
// juanfc 2025-09-29
// https://gist.github.com/juanfal/e6333a1de084b92ee95211613a21f525
#include <iostream>
using namespace std;
int main()
{
cout << boolalpha; // to print all bools as true/false
int n;
cout << "Enter an integer number: ";
cin >> n;
cout << "0 <= " << n << " <= 100 -> " << (0 <= n and n <= 100) << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment