fork(3) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.  
  5. int a;
  6.  
  7. scanf("%d",&a);
  8. if(((a%4==0) && !(a%100==0)) || (a%400==0)){
  9. printf("閏年です");
  10. }
  11. else{
  12. printf("閏年ではありません");
  13. }
  14.  
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 5320KB
stdin
2024
stdout
閏年です