谁能帮我做一个C语言程序啊

来源:百度知道 编辑:UC知道 时间:2024/06/08 01:30:11
应付考试的那种,不要太简单了.做好了追加80啊!谢谢了!

/*
设计一个高尔夫小游戏
全长280米 3种模式可以选择 A: rondom 100 (80-120)
B: rondom 30 (24-36) C:rondom 10 (8-12)
除ABC模式之外全为误杆,距离不变,打击次数加1;
当距离〈=10的时候,如果选择C模式,提示成功;
A模式则|距离-random 100|
B模式则|距离-random 30|
打击直到球进洞为止。
成功后,如打击低于5次 输出under par;
高于5 over par;
等于5 par;
输出例子(含误杆元素)
The hole is a par 5 and is 280 meters in length.
You may use a driver, iron, or a putter.
The average distance each club can hit is:
Driver = 100m, Iron = 30m, Putter = 10m
START GAME

You are 280 metre/s from the hole, after 0 stroke/s.
Please select [ (D)river-100m, (I)ron-30m, (P)utter-10m ]:q

Invalid club selection... Air Swing!
You hit 0 metres ...

You are 280 metre/s from the hole, after 1 stroke/s.
Please select [ (D)river-100m, (I)ron-30m, (P)utter-10m ]:D

You hit 96 metres ...

You are 184 metre/s from the hole, after 2 stroke/s.
Please select [ (D)river-100m, (I)ron-30