English, asked by sreenivas99, 9 months ago

Vicky's birthday
Vicky's birthday is on February 29th. He can only celebrate his birthdays in leap year. Can you help Vicky to determine whether he can
celebrate his birthday in the year mentioned by him.
Input should be an integer. (Usage : nested if)​

Answers

Answered by sangitakashid555
0

Answer:

I am in 5 standard so I don't know

Answered by MSFLAB3
1

Answer:

#include<iostream>

main()

{

 int y;

 std::cin>>y;

 if(y%400!=0)

 {

   if(y%4==0 && y%100!=0)

     std::cout<<"Vicky can celebrate his birthday.";

     else

     std::cout<<"Vicky can't celebrate.";

 }

 else

   std::cout<<"Vicky can celebrate his birthday.";

}

Similar questions