Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Program: bisiesto.cc
- // Author: Yoan Pinzon
- // Date: Agosto 30, 2006
- #include <iostream>
- using namespace std;
- int main()
- {
- int year;
- bool bisiesto;
- cout << "A¤o Bisiesto" << endl;
- cout << "============" << endl;
- cout << "Entre el a¤o = "; cin >> year;
- bisiesto = ( ( year % 4 == 0 && year % 100 != 0 ) || year % 400 == 0 );
- if(bisiesto)
- {
- cout << year << " es bisiesto" << endl;
- }
- else
- {
- cout << year << " NO es bisiesto" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement