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

摸索着交个作业... #45

Open
wants to merge 54 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
8ae0892
Create C0
Flashkong Feb 23, 2017
0d37b80
Create C1
Flashkong Feb 23, 2017
459abc5
Create p01
Flashkong Feb 23, 2017
5e4c664
Create p02
Flashkong Feb 23, 2017
52e5fc5
Create p04
Flashkong Feb 23, 2017
68ca0ec
Create p05
Flashkong Feb 23, 2017
e09e1bf
Rename C0 to helloworld.c
Flashkong Mar 6, 2017
5c26851
Update and rename p02 to p02-isPrime.c
Flashkong Mar 6, 2017
07caa6d
Rename C1 to c1panduanshu.c
Flashkong Mar 6, 2017
e73f43b
Rename p04 to p04 shuixianshu.c
Flashkong Mar 6, 2017
3081dd5
Rename p05 to p05-allPrimes.c
Flashkong Mar 6, 2017
afdfd69
Create RunningLetter.c
Flashkong Mar 27, 2017
bd64562
Create isprime.c
Flashkong Mar 28, 2017
9736e55
Create Diophantus.c
Flashkong Apr 1, 2017
836bce3
Create narcissus.c
Flashkong Apr 1, 2017
b961323
Create allPrimers.c
Flashkong Apr 1, 2017
a05d35e
Create Goldbach.c
Flashkong Apr 1, 2017
413d81a
Create hanoi.c
Flashkong Apr 1, 2017
af0a055
Create maze.c
Flashkong Apr 7, 2017
090a297
Delete p01
Flashkong Apr 9, 2017
77b94ed
Delete p02-isPrime.c
Flashkong Apr 9, 2017
e7f3b34
Delete p04 shuixianshu.c
Flashkong Apr 9, 2017
6424039
Delete p05-allPrimes.c
Flashkong Apr 9, 2017
2c66d56
Create PushBoxs.c
Flashkong Apr 12, 2017
494b468
Create linklist.c
Flashkong Apr 13, 2017
d7d972a
Create encrypt_decrypt.c
Flashkong Apr 13, 2017
a6cdf75
Create Queue.cpp
Flashkong Apr 27, 2017
ba7b9ab
Create SafeArry.cpp
Flashkong Apr 27, 2017
6b5d5b1
Change Addback
Flashkong Apr 28, 2017
2fa1034
Updata procedure
Flashkong Apr 28, 2017
1e5c733
Submit Circle and Point
Flashkong May 3, 2017
4521c43
submit canvas
Flashkong May 3, 2017
de09a27
Update Canvas.cpp
Flashkong May 4, 2017
a2a2752
Update TodoList.md
Flashkong May 15, 2017
cb402e5
Update TodoList.md
Flashkong May 16, 2017
29a043e
Update TodoList.md
Flashkong May 16, 2017
ca447d6
Update TodoList.md
Flashkong May 17, 2017
3d551a1
Create flight.cpp
Flashkong May 18, 2017
b875fd9
Update flight.cpp
Flashkong May 18, 2017
a2de511
Update flight.cpp
Flashkong May 18, 2017
b7193bc
Update TodoList.md
Flashkong May 20, 2017
0662574
add one feature
Flashkong May 23, 2017
0d37747
achieve bullet and enemy_flight collide
Flashkong May 23, 2017
daee9de
Update TodoList.md
Flashkong May 23, 2017
c5d1987
add explotion animation and music
Flashkong May 23, 2017
90eb3ba
Update flight.cpp
Flashkong May 23, 2017
3e6d9bd
Update README.md
Flashkong Jun 5, 2017
587a0f5
Update README.md
Flashkong Jun 5, 2017
4baf6a0
Create ReadmeFirst
Flashkong Jun 12, 2017
be41a2e
Create ReadmeFirst.md
Flashkong Jun 12, 2017
b501c1b
Delete flight.cpp
Flashkong Jun 12, 2017
ceb67fc
Create TodoList.md
Flashkong Jun 12, 2017
79094cb
Create TodoList.md
Flashkong Jun 13, 2017
6f04154
Create READMEFIRST.md
Flashkong Jun 13, 2017
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
8 changes: 8 additions & 0 deletions practices/c/level0/C0
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# 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.

文件名的后缀应该是.c


int main()
{
printf("Hello World! I'm 李帅锋!\n");

return 0;
}
23 changes: 23 additions & 0 deletions practices/c/level0/C1
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# include <stdio.h>

int main()
{
int input;
scanf("%d",&input);

if(input>0){
if(input%2==0){
printf("是正数而且是偶数\n");
}
else {
printf("是正数但不是偶数\n");
}
}
else if(input==0){
printf("既不是正数也不是负数\n");
}
else{
printf("是负数\n");
}
return 0;
}
26 changes: 26 additions & 0 deletions practices/c/level1/p01_runningLetter/p01
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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.

这个文件不需要了,应该删掉

# include<windows.h>

int main()
{
int i,j;
for(i=0;i<12;i++){
for(j=0;j<i;j++){
printf(" ");
}
Sleep(100);
printf("R");
system("cls");
}

for(i=12;i>0;i--){
Copy link
Owner

Choose a reason for hiding this comment

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

smell! 闻到了重复的味道,这段代码与上面的非常相似,请设法消除之

for(j=0;j<i;j++){
printf(" ");
}
Sleep(100);
printf("R");
system("cls");
}

return 0;
}
24 changes: 24 additions & 0 deletions practices/c/level1/p02_isPrime/p02
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# include<stdio.h>

int main()
{
int i,x = 0;
int infox=-1;
scanf("%d",&x);

for( i=2;i<x;i++){
if(x%i==0){
infox++;
}
}

}
Copy link
Owner

Choose a reason for hiding this comment

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

怎么多了一个括号?

if(infox==-1){
printf("是素数\n");
}
else {
printf("不是素数\n");
}

return 0;
}
19 changes: 19 additions & 0 deletions practices/c/level1/p04_ narcissus/p04
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# include <stdio.h>
# include <math.h>

int main()
{
int number = 153;

for(number=100;number<1000;number++){

int number1 = number/100;
int number2 = (number%100)/10;
int number3 = number%10;
if(number==pow(number1,3)+pow(number2,3)+pow(number3,3)){
printf("%d\n",number);
}
}

return 0;
}
21 changes: 21 additions & 0 deletions practices/c/level1/p05_allPrimes/p05
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# include<stdio.h>


int main()
{
int num;
int fox = 0;
for(num=2;num<2000;num++){
for(int i=2;i<num;i++){
if(num%i==0){
fox++;
}
}
if(fox==0){
printf("%d\n",num);
}
fox=0;
}

return 0;
}