What will be the output of the following program segment?
a) cin >> x;
if ( x = = 10 )
cout << "x is 10" ;
else
cout << "x is not 10" ;
if the input given is
(i) 11
(ii) 10
int year ;
cin >> year ;
if (year % 100 = = 0)
if (year % 400 = = 0)
{
cout << "Leap" ;
else
cout << "Not century year" ;
}
if the input is
(i) 2000
(ii) 1971
Answers
Answered by
1
What will be the output of the following program segment?
a) cin >> x;
if ( x = = 10 )
cout << "x is 10" ;
else
cout << "x is not 10" ;
if the input given is
(i) 11
(ii) 10
int year ;
cin >> year ;
if (year % 100 = = 0)
if (year % 400 = = 0)
{
cout << "Leap" ;
else
cout << "Not century year" ;
}
if the input is
(i) 2000
(ii) 1971
PLEASE MAKE ME AS A BRAINLIST ANSWER BRO
Similar questions