1. //
    2. // main.c
    3. // test_e
    4. //
    5. // Created by dezhu on 2021/12/23.
    6. // Copyright © 2021年 dezhu. All rights reserved.
    7. //
    8. #include <stdio.h>
    9. #include <stdio.h>
    10. int main(int argc, const char * argv[]) {
    11. // insert code here...
    12. int money;
    13. float all;
    14. int number;
    15. printf("一元为1,五角为2,一角为3");
    16. scanf("%d", &money);
    17. printf("please input mount of money");
    18. scanf("%d", &number);
    19. if(money==1)
    20. all = 1* number;
    21. if(money==2)
    22. all = 0.5 * number;
    23. if(money ==3)
    24. all = 0.1 * number;
    25. if(all>2)
    26. printf("have a good trip");
    27. else
    28. printf("sorry, not enough money");
    29. printf("Hello, World!\n");
    30. return 0;
    31. }