English

Rewrite the following program segment using logical operators: if (x>5) if (x>y) System.out.println (x+y);

Advertisements

Question

Rewrite the following program segment using logical operators:

if (x>5)
if (x>y)
System.out.println (x+y);
Code Writing
Advertisements

Solution

if(x>5 && x>y)
System.out.println(x+y);
shaalaa.com
  Is there an error in this question or solution?
Chapter 1: Revision of Class 9 Syllabus - Exercises [Page 49]

APPEARS IN

Rupa Pandit Computer Applications [English] Class 10 ICSE
Chapter 1 Revision of Class 9 Syllabus
Exercises | Q 9. | Page 49
Advertisements
Share
Notifications



      Forgot password?
Use app×