Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string.h>
- #include <stdlib.h>
- using namespace std;
- int anno;
- bool bisestile;
- int main() {
- cout << "Anno:";
- cin >> anno;
- if (anno % 100 == 0) {
- if (anno % 400 == 0) {
- bisestile = true;
- } else {
- bisestile = false;
- }
- } else if (anno % 4 == 0) {
- bisestile = true;
- } else {
- bisestile = false;
- }
- if (bisestile) {
- cout << "BISESTILE\n";
- } else {
- cout << "Nonsestile\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement