English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

What will be the output of the following code: int year; cin >> year; if (year % 100 == 0) if ( year % 400 == 0) cout << "Leap";else cout << "Not Leap year";If the input given is 2003? - Computer Science

Advertisements
Advertisements

Question

What will be the output of the following code:

int year;
cin >> year;
   if (year % 100 == 0)
       if ( year % 400 == 0)
            cout << "Leap";
else
           cout << "Not Leap year";
If the input given is 2003?

Short Note

Solution

2003 AS INPUT
Output
Not Leap year

shaalaa.com
Selection 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 4. (ii) | Page 178
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×