fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int i;
  6. scanf("%d",&i);
  7. if(0<i&&i<5000){
  8. i= i+100;
  9. printf("%dの支払いです",i);
  10. }
  11. else if(5000<=i&&i<10000){
  12. i= i+200;
  13. printf("%dの支払いです",i);
  14. }
  15. else if(i>=10000){
  16. i= i+300;
  17. printf("%dの支払いです",i);
  18. }
  19. else if(i<=0){
  20. printf("正しい金額を入力してください");
  21. }
  22. return 0;
  23. }
  24.  
Success #stdin #stdout 0s 5320KB
stdin
-1000
stdout
正しい金額を入力してください