-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
樊捷明 cpp1~9 + 打飞机游戏 #32
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
先看到这里吧
printf(" "); | ||
} | ||
puts(ch); | ||
usleep(50000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
缩进对齐
|
||
char ch[N]; | ||
|
||
void runLetter(int n) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
前面只写函数原型,函数的实现放到后面去
} | ||
|
||
int checkRight(int t) { | ||
return t <= 80 - strlen(ch); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
80应该定义一个常量
|
||
int main() { | ||
printf("Input the word or letter:\n"); | ||
gets(ch); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
缩进对齐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
做得不错,再改改就可以merge了哈
int isPrime(int x); | ||
void init(); | ||
|
||
struct data { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此处data是类型名,建议改为:Data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Data没有说明作用,最好改个名字;
a,b,c是什么意思,名字不好
printf(" 1:显示存货列表\n 2:入库\n 3:出库\n 0:退出程序\n"); | ||
int k; | ||
scanf("%d",&k); | ||
if (k == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里用switch更舒服
加入了打飞机游戏