is my code is right or not guys?? | Sololearn: Learn to code for FREE!
0

is my code is right or not guys??

#include <iostream> using namespace std; int main() { int a,b; cout << "enter the values a&b" << endl; cin >> a >> b; bool isequal= a==b; bool isAgreater = a>b; bool isAless= a<b; cout << "a and b are equal: " << isequal << endl; cout << "a is greater and b is smaller:" << isAgreater << endl; cout << "a is smaller and b is greater: " << isAless << endl; bool third = isequal || isAgreater; cout << third << endl; bool forth = isequal || isAless; cout << forth << endl; bool fifth = isAgreater || isAless; cout << fifth << endl; bool sixth= isequal&&isAgreater; cout << sixth<< endl; bool seventh = isAgreater&&isAless; cout << seventh << endl; bool eirght = !isequal; cout << eirght << endl; bool ninth = !isAgreater; cout << ninth << endl; bool tenth = !isAless; cout << tenth << endl; }

28th Dec 2018, 5:21 PM
TANIYA
TANIYA - avatar
0 Answers