Skip to content

Instantly share code, notes, and snippets.

@Adals20
Created February 18, 2017 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Adals20/a70ed6493c5f7157259da90ef32c9373 to your computer and use it in GitHub Desktop.
Save Adals20/a70ed6493c5f7157259da90ef32c9373 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
main (){
int anno;
cout << "Introduce un año de 4 dijitos para saber si es bisiesto: ";
cin >> anno;
if (anno < 1752)
cout << "No hay años bisiestos antes de 1752" << endl;
else if (anno%4 == 0 && (anno%100 != 0 || anno%400==0))
cout << "\nEl año " << anno << " es un año bisiesto";
else
cout << "\nEl año " << anno << " NO es un año bisiesto";
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment