+ 4
Leap year teller. what's the problem in it ? Can you fix it ?
#include <iostream> using namespace std; int main() { int days; cout<<"Enter Number of days in a year\n"; cin >>days; if(days>363) { if(days%4==0) { cout<<"Leap Year!\n"; } else { cout<<"Not leap year!\n"; } } else { cout<<"Invalid Input!\n"<<"Please enter days in a year!\n"; } return 0; }
4 Answers