Computer Science, asked by opbeast955, 1 month ago

30. Given two variables, num1 and num2, which of the following would mean that both num1 and num2 are positive integers?a(num1 == num2) b(num1 == num2) or (num1 > 0) c (num1 d(num1 == num2) and (num1 0)​

Answers

Answered by jyothikashyap
0

Answer:

The answer is d.

Explanation:

Here in (num1 == num2) and (num1>0)

num1 is possitive integer and also a/c to first condition num2 also possitive integer.

Answered by Jasleen0599
0

The correct answer is (d) (num1 == num2) and (num1 > 0).

  • ​In PC programming, operators are builds characterized inside programming dialects that commonly act like capacities, but contrast linguistically or semantically. Normal basic models incorporate math, correlation, and coherent operations.
  • The && (logical AND) operator demonstrates whether the two operands are valid. Assuming the two operands have nonzero values, the outcome has a worth of 1. Otherwise, the outcome has a worth of 0.
  • Here, num1 == num2 signifies that the two numbers provided by the user should be equal. On the other hand, num1 > 0 means num1 is a positive number. Taking AND operation, the statement would be executed if and only if both statements stand true.
  • Like this, both numbers would be positive as num1 == num2 i.e., if num1 is positive then num2 will also be positive.
Similar questions