-
Notifications
You must be signed in to change notification settings - Fork 78
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
2018081309027陶奕兮 #44
Open
CWMYStargazer
wants to merge
15
commits into
luckymark:master
Choose a base branch
from
CWMYStargazer:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
2018081309027陶奕兮 #44
Changes from 3 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
58770d4
完成了running letter
CWMYStargazer ce5fb7b
lv1_p05
CWMYStargazer 06706f1
lv1_p06
CWMYStargazer a80ec5e
rename
CWMYStargazer 6eb8f2d
enc&dec complete.
CWMYStargazer 7c55eb5
lv1_p08
CWMYStargazer 486e651
maze is complete^^
CWMYStargazer 7d04bb6
Pushbox complete.
CWMYStargazer 0fd2b98
gitigonre?
CWMYStargazer 9486fa9
Update move.cpp
CWMYStargazer 5e2246d
Linklist complete.
CWMYStargazer 407347c
linklist complete.
CWMYStargazer c989bb0
linklist
CWMYStargazer 4542bdd
.
CWMYStargazer f149802
linklist complete.
CWMYStargazer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
printf("Hello world!I'm tyx!"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
int n; | ||
printf("Please put in a number:\n"); | ||
scanf("%d",&n); | ||
if(n%2==0) printf("It's an even number.\n"); | ||
else printf("It's an odd number.\n"); | ||
if(n>0) printf("It's a positive number.\n"); | ||
else if(n==0) printf("It's zero.\n"); | ||
else printf("It's a negative number.\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
int n; | ||
printf("Please put in a number:\n"); | ||
scanf("%d",&n); | ||
if(n%13==0) printf("Yes.\n"); | ||
else printf("No.\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
int b[5],c[10]={0}; | ||
printf("Please put in 5 numbers(between 0-9):\n"); | ||
for(int i=0;i<5;i++) | ||
{ | ||
scanf("%d",&b[i]); | ||
for(int t=0;t<10;t++) | ||
{ | ||
if(b[i]==t) c[t]++; | ||
} | ||
} | ||
for(int t=0;t<10;t++) | ||
{ | ||
for(int i=1;i<=c[t];i++) | ||
{ | ||
printf("%d,",t); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include<stdio.h> | ||
#include<stdlib.h> | ||
int main() | ||
{ | ||
system("color 0a"); | ||
while(1) | ||
{ | ||
printf("0 1"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include<stdio.h> | ||
#include<stdlib.h> | ||
int main() | ||
{ | ||
system("color 0a"); | ||
while(1) | ||
{ | ||
printf("%d\t",rand()/1000); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include<stdio.h> | ||
#include<stdlib.h> | ||
int main() | ||
{ | ||
int i,wide=80; | ||
bool turn; | ||
for(i=0;;) | ||
{ | ||
for(int t=0;t<=i;t++) | ||
{ | ||
printf(" "); | ||
} | ||
printf("R"); | ||
system("cls"); | ||
if(i==wide) turn=1; | ||
if(i<0) turn=0; | ||
if(turn==0) i++; | ||
else i--; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
int n,ans=0; | ||
printf("Please input a positive integer:\n"); | ||
scanf("%d",&n); | ||
for(int t=2;t<=n/2;t++) | ||
{ | ||
if(n%t==0) | ||
{ | ||
ans=1; | ||
break; | ||
} | ||
} | ||
if(ans==1) printf("It's not a prime number."); | ||
else printf("It's a prime number."); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
for(int age=1;;age++) | ||
{ | ||
if(age/6+age/12+age/7+5+age/2+4==age) | ||
{ | ||
printf("%d",age-4); | ||
break; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include<stdio.h> | ||
int main() | ||
{ | ||
int x,g,s,b; | ||
for(x=100;x<=999;x++) | ||
{ | ||
g=x%10; | ||
s=((x-g)/10)%10; | ||
b=(x-g-s)/100; | ||
if(x==g*g*g+s*s*s+b*b*b) | ||
{ | ||
printf("%d��",x); | ||
} | ||
} | ||
getchar(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include<stdio.h> | ||
#include<time.h> | ||
int main() | ||
{ | ||
long t1,t2; | ||
t1=clock(); | ||
for(int n=2;n<=1000;n++) | ||
{ | ||
for(int t=2;t<=n/2+1;t++) | ||
{ | ||
if(t==n/2+1) printf("%d,",n); | ||
if(n%t==0) break; | ||
} | ||
} | ||
t2=clock(); | ||
printf("\nTotally used %ld ms.\n",(t2-t1)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include<stdio.h> | ||
int is_p(int x) | ||
{ | ||
for(int i=2;i<=x/2+1;i++) | ||
{ | ||
if(i==x/2+1) return 1; | ||
if(x%i==0) | ||
{ | ||
return 0; | ||
break; | ||
} | ||
} | ||
} | ||
|
||
int main() | ||
{ | ||
int prime; | ||
for(int t=4;t<101;t=t+2) | ||
{ | ||
int m=2,n; | ||
for(;;) | ||
{ | ||
prime=is_p(m); | ||
if(prime==1) | ||
{ | ||
n=t-m; | ||
prime=is_p(n); | ||
if(prime==1) | ||
{ | ||
printf("%d=%d+%d\n",t,m,n); | ||
break; | ||
} | ||
} | ||
m++; | ||
} | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
文件名应该有明确的含义,不宜使用1.cpp这样的,就像变量名不宜用abc一样;