fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int anno;
  5.  
  6. int main() {
  7.  
  8. cin>>anno;
  9. if (anno%400 ==0) {cout<< "anno "<<anno<<" è bisestile"<<endl;}
  10. else { if (anno%4==0)
  11. { if (anno%100 != 0) {cout<< "anno "<<anno<<" è bisestile"<<endl;}
  12. else {cout<< "anno "<<anno<<" NON è bisestile"<<endl;}}
  13. else {cout<< "anno "<<anno<<" NON è bisestile"<<endl;}}
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 5316KB
stdin
2028
stdout
anno 2028 è bisestile