Skip to content
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

Try #42

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Try #42

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions running letter.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include<stdio.h>
#include<stdlib.h>
int main ()
{
int i,j,a,b;
for(i=0;i<=80;i++){
for(j=0;j<i;j++){
printf(" ");
}
printf("%c ",'R');
system("cls");
}
for(a=80;a>=0;a--){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

与上一段代码相似,请尝试消除重复

for(b=0;b<=a;b++){
printf(" ");
}
printf("%c ",'R');
system("cls");
}
return 0;
}
21 changes: 21 additions & 0 deletions 未命名1.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include<stdio.h>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

未命名1.cpp是做什么用的呢?文件名最好有明确的含义,就像变量名不宜用abc

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

跟上一个一样的?可能是git还没用熟练,没关系,多练习练习就好了!

#include<stdlib.h>
int main ()
{
int i,j,a,b;
for(i=0;i<=80;i++){
for(j=0;j<i;j++){
printf(" ");
}
printf("%c ",'R');
system("cls");
}
for(a=80;a>=0;a--){
for(b=0;b<=a;b++){
printf(" ");
}
printf("%c ",'R');
system("cls");
}
return 0;
}