हिंदी

The following is a segment of a program: x = 1; y = 1; if (n > 0) { x = x + 1; y = y +1; } What will be the value of x and y, if n assumes a value 0? - Computer Applications

Advertisements
Advertisements

प्रश्न

The following is a segment of a program: 

x = 1; y = 1;

if (n > 0) 
   { 
   x = x + 1; 
   y = y + 1; 
   } 

What will be the value of x and y, if n assumes a value 0?

संक्षेप में उत्तर

उत्तर

x = 1

y = 1

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 1.09: Iterative Constructs in Java - EXERCISES [पृष्ठ १२२]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
अध्याय 1.09 Iterative Constructs in Java
EXERCISES | Q III. 1. (b) | पृष्ठ १२२
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×