摘要: #define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h> int main(){ int i = 0; for (; i < 3; i++) { char password[1024] = { 0 }; printf(" 阅读全文
posted @ 2020-03-27 20:41 听说在北郭 阅读(198) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <stdlib.h> //接受一个整型值(无符号)按照顺序打印它的每一位//1234 打印1 2 3 4void PrintNum(unsigned int num){ if (num > 9){ PrintNum(num / 10); } pr 阅读全文
posted @ 2020-03-26 15:07 听说在北郭 阅读(104) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <stdlib.h> int IsLeapYear(int year){ //返回1,闰年。返回0,不是闰年。 //闰年有世纪闰年和普通闰年 //也可 (year % 100 != 0 && year % 4 == 0) || (year % 4 阅读全文
posted @ 2020-03-26 10:18 听说在北郭 阅读(872) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <stdlib.h> int IsPrime(int num){ //返回1,素数。返回0,不是素数。 if (num == 0){ return 0; }if (num == 1){ return 0; }for (int i = 2; i < 阅读全文
posted @ 2020-03-26 09:37 听说在北郭 阅读(1465) 评论(0) 推荐(0)
摘要: #define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h> int main(){ int i; int a , b, c;// 个位, 十位, 百位 for (i = 100; i < 1000; i++){ a = i 阅读全文
posted @ 2020-03-25 15:08 听说在北郭 阅读(102) 评论(0) 推荐(0)
摘要: #define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h> int main()//1 - 1/2 + 1/3 - 1/4 + 1/5 +...+1/99 - 1/100{ int i; double sum = 0; d 阅读全文
posted @ 2020-03-24 15:54 听说在北郭 阅读(591) 评论(0) 推荐(0)
摘要: #define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h> int main()//求Sa = a + aa + aaa +aaaa + aaaaa(前五项之和)//aa = a + 10*a a...a(m个) = 10 阅读全文
posted @ 2020-03-24 15:39 听说在北郭 阅读(752) 评论(0) 推荐(0)
摘要: #define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h> int main()//求阶乘的和{ int i, n; int sum = 0; int tmp = 1; printf("请输入数字:"); scanf("% 阅读全文
posted @ 2020-03-24 15:23 听说在北郭 阅读(320) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <stdlib.h> //如果说兔子在出生两个月后,就有繁殖能力,在拥有繁殖能力之后,//这对兔子每个月能生出一对小兔子来。假设所有兔子都不会死去//能够一直生下去,那么两年之后可以繁殖多少对兔子呢 int main()//斐波那契数列{ lon 阅读全文
posted @ 2020-03-24 14:51 听说在北郭 阅读(174) 评论(0) 推荐(0)
摘要: #define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <stdlib.h>#include <time.h> void Game(){ int toGuess = rand() % 100 + 1; while (1){ printf(" 阅读全文
posted @ 2020-03-23 19:59 听说在北郭 阅读(124) 评论(0) 推荐(0)