Help me in solving CLB032 problem

My issue

Write a program which does the following

For now, declare two variables x and y
Assign the value true to x and the value false to y
Output x and y to the console on separate lines
Note how we are not using any quotes around true and false. Also, they have to be in lowercase alphabets.

Sample 1:
Input
Output

1
0
Did you like the problem?
41 users found this helpful

My code

include

Learning course: Programming and Problem solving using C
Problem Link: https://www.codechef.com/learn/course/ciet-programming-c/CIETPC07/problems/CLB032

To solve this, you need to declare two Boolean variables, x and y, assign true to x and false to y, then output their values as integers.

include
using namespace std;

int main() {
bool x = true;
bool y = false;

cout << x << endl;  // Outputs 1 for true
cout << y << endl;  // Outputs 0 for false

return 0;

}