My issue
Task
You are given two variables height1 and height2 - use relation operators to output
0
0(false) if they are equal else output
1
1(true).
solution :
include <bits/stdc++.h>
using namespace std;
int main() {
int height1 = 15;
int height2 = 13;
cout<<(bool(height1 == height2));
}
what is wrong with the above solution can u please explain
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
int height1 = 15;
int height2 = 13;
cout<<(bool(height1 == height2));
}
Learning course: Learn Programming and Problem Solving using C++
Problem Link: https://www.codechef.com/learn/course/sit-cpp-fall/SITFALL13/problems/CPPFALL76