Set a variable without using Arithmetic, Relational or Conditional OperatorWe are given three variables, a, b, and c, and our task is to set the value of x without using any arithmetic, relational and conditional operators. We need to follow the below rules. Method to FollowExample Arithmetic Operators C++ CodeOutput: JTP1 + JTP2= 13 JTP1 - JTP2 = 7 JTP1 * JTP2 = 30 JTP1 / JTP2 = 3 JTP1 % JTP2 = 1 Relational Operators
Conditional OperatorsOutput: The largest number between 5 and 10 is 10 Set a Variable without using Arithmetic, Relational or Conditional OperatorC++ code Output: 45 C++ codeOutput: 7 |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India