fork download
  1. /* Helloプログラム */
  2.  
  3. #include <stdio.h>
  4.  
  5. main()
  6. {
  7. int a=-3,b=2,year=2025,total1=0,total2=0;
  8.  
  9. if(a<0){
  10. printf("入力エラーです。\n");
  11. }
  12.  
  13.  
  14. if(b==1){
  15. printf("大吉です。\n");
  16. }
  17. else if(b==2){
  18. printf("大吉です。\n");
  19. }
  20. else if(b==3){
  21. printf("大吉です。\n");
  22. }
  23.  
  24. if((year%100==0)&&(year%400!=0)){
  25. printf("うるう年ではありません。\n");
  26. }
  27. else if(year%4==0){
  28. printf("うるう年です\n");
  29. }
  30. else{
  31. printf("うるう年ではありません。\n");
  32. }
  33.  
  34. }
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
入力エラーです。
大吉です。
うるう年ではありません。