हिंदी

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

Advertisements
Advertisements

प्रश्न

The following is a segment of a program: 

x = 1; y = 1;

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

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

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

उत्तर

x = 2

y = 2  

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. (a) | पृष्ठ १२२
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×