Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3. #include <stdlib.h>
  4. using namespace std;
  5.  
  6. int anno;
  7. bool bisestile;
  8.  
  9. int main() {
  10. cout << "Anno:";
  11. cin >> anno;
  12. if (anno % 100 == 0) {
  13. if (anno % 400 == 0) {
  14. bisestile = true;
  15. } else {
  16. bisestile = false;
  17. }
  18. } else if (anno % 4 == 0) {
  19. bisestile = true;
  20. } else {
  21. bisestile = false;
  22. }
  23. if (bisestile) {
  24. cout << "BISESTILE\n";
  25. } else {
  26. cout << "Nonsestile\n";
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement