Open
Conversation
luckymark
reviewed
Mar 5, 2017
| #include<stdio.h> | ||
| #include<windows.h> | ||
| #define SPACE 50 | ||
| void show(char *pos); |
P02_isprime.c
Outdated
| mark = 1; //若被整除,标记mark为1 | ||
| break; | ||
| } | ||
| }if (mark == 1) |
| for(int i=2;i<=1000;i++) | ||
| { | ||
| if (isprinme(i)) | ||
| printf("%5d", i); |
p05_allPrimes.c
Outdated
| #include<stdio.h> | ||
| #include<stdlib.h> | ||
| #include<time.h> | ||
| int isprinme(int a); |
| } | ||
| if (mark == 1) //检查标记 | ||
| return 0; | ||
| else return 1; |
Owner
There was a problem hiding this comment.
这里改为?表达式更清真一点(这是我们项目组内部的说法,意思是代码漂亮干净)
| if (a == prime[i] + prime[j]) //遍历两个100以内的素数组合之和,与a作比较 | ||
| { | ||
| printf("%d满足哥德巴赫猜想\n",a); | ||
| goto b; //跳出遍历循环 |
p06_Goldbach.c
Outdated
| mark = 1; //若被整除,标记mark为1 | ||
| break; | ||
| } | ||
| }if (mark == 1) |
| ret_val = fgets(st, n, stdin); | ||
| if (ret_val) | ||
| { | ||
| while (st[i] != '\n'&&st[i] != '\0') |
| @@ -0,0 +1,528 @@ | |||
| #include<stdio.h> | |||
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.