-
Gist可以用来记录自己编写的代码片段,或自己想要记录的代码片段
-
代码片段可以链接到自己的博客网页等实现共享
-
也可以在Github的Gist中搜索关键字寻找代码片段
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
#include<stdio.h> | |
int main() { | |
freopen("D://WorkSpace//input.txt", "r", stdin); | |
freopen("D://WorkSpace//output.txt", "w", stdout); | |
int x; | |
int count = 0; | |
while (scanf("%d", &x) != -1) { | |
do | |
{ | |
x = x / 10; |
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
#include<stdio.h> | |
void main() { | |
int i = 1; | |
while (i > 0) { | |
i++; | |
} | |
printf("Min = %d, Max = %d\n", i , i-1); | |
system("pause"); | |
} |
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
#include<stdio.h> | |
int main() { | |
int a, b, n, m; | |
scanf("%d%d", &n, &m); | |
a = (4 * n - m) / 2; | |
b = n - a; | |
if (m % 2 == 1 || a < 0 || b < 0) { | |
printf("No answer\n"); | |
} | |
else { |
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
#include<stdio.h> | |
int main() { | |
int n; | |
int m; | |
scanf("%d", &n); | |
m = (n % 10) * 100 + (n / 10 % 10) * 10 + (n / 100); | |
printf("%d", m); | |
system("pause"); | |
return 0; | |
} |
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
#include<stdio.h> | |
int main() { | |
int n; | |
scanf("%d", &n); | |
printf("%d%d%d\n", n%10, n/10%10, n/100); | |
system("pause"); | |
return 0; | |
} |
NewerOlder