English

Give an example of a compound statement. - Computer Applications

Advertisements
Advertisements

Question

Give an example of a compound statement.

Answer in Brief

Solution

if (a > b)
{ sum = a + b; 
pdt = a * b; 
}

In the example above, the statements placed in curly brackets are carried out if the condition is true. 

shaalaa.com
  Is there an error in this question or solution?
Chapter 1.08: Conditional Statements in Java - EXERCISES [Page 100]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 1.08 Conditional Statements in Java
EXERCISES | Q V. 6. (ii) | Page 100
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×