English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

Correct the following code sigment: if (x = 1) p = 100; else p = 10; - Computer Science

Advertisements
Advertisements

Question

Correct the following code sigment:

if (x = 1)
   p = 100; 
else
   p = 10;

Chart

Solution

Given Code Corrected Code
if (x = 1)
   p = 100; 
else
   p = 10;

if(x == 1)
   p = 100;
else
   p = 10;

shaalaa.com
Statements
  Is there an error in this question or solution?
Chapter 10: Flow of Control - Evaluation - Section - B [Page 178]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 11 TN Board
Chapter 10 Flow of Control
Evaluation - Section - B | Q 3. | Page 178
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×