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 |
JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week