English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

Convert the following if-else to a single conditional statement: if (x >= 10) a = m + 5;else a = m; - Computer Science

Advertisements
Advertisements

Question

Convert the following if-else to a single conditional statement:

if (x >= 10)
    a = m + 5;
else
    a = m;

One Line Answer

Solution

a = (x > = 10)? m + 5:m;

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

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×
Our website is made possible by ad-free subscriptions or displaying online advertisements to our visitors.
If you don't like ads you can support us by buying an ad-free subscription or please consider supporting us by disabling your ad blocker. Thank you.