+ 1

Hi need help solving this one

given that A and B are real vaiables with values 1,5 and 2,5 respectively and C is integer with value 3 , evaluate the following: NOT (A<0) AND (B/C<0)

25th Jan 2017, 7:17 PM
Daravan Daro
Daravan Daro - avatar
2 ответов
+ 10
#include <iostream> using namespace std; int main() { double A = 1.5, B = 2.5; int C = 3; bool D = !(a<0) && (b/c<0); cout<<D; return 0; }
25th Jan 2017, 7:59 PM
Filip
Filip - avatar
+ 3
In C++: float a = 1.5, b = 2.5; int c = 3; bool d = not(a<0) && (b/c<0); cout << d; //Outputs 0 i.e. false
25th Jan 2017, 7:27 PM
Jafca
Jafca - avatar