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