上一页 1 ··· 69 70 71 72 73 74 75 76 77 ··· 84 下一页
摘要: 先判断后转化 原理: 这类题目主要通过ASCII(美国信息交换标准代码)码差值实现,A对应ASCII码十进制数字是65,a对应ASCII码十进制数字是97,即大小写字母之间ASCII码差值为32,想要将大写字母转换为小写字母可以将该字符ASCII码值+32,同理小写字母转换成大写字母只需将该字符AS 阅读全文
posted @ 2019-11-27 20:48 木子欢儿 阅读(8754) 评论(0) 推荐(0)
摘要: 什么是完数? 如果一个数等于它的因子之和,则称该数为“完数”(或“完全数”)。 例如,6的因子为1、2、3,而 6=1+2+3,因此6是“完数”。 问题分析 根据完数的定义,解决本题的关键是计算出所选取的整数m(m的取值范围不固定)的因子(因子就是所有可以整除这个数的数),将各因子累加到变量sum 阅读全文
posted @ 2019-11-27 18:54 木子欢儿 阅读(4789) 评论(0) 推荐(0)
摘要: #include <stdio.h> void fun(int *x,int*y) { int t; if(*x>=*y) { t=*x;*x=*y;*y=t; } } main() { int m,n; printf("请输入2个数字\n"); scanf("%d%d",&m,&n); fun(& 阅读全文
posted @ 2019-11-27 17:10 木子欢儿 阅读(499) 评论(0) 推荐(0)
摘要: #include <stdio.h> int fun(int x) { int n; for(n=2;n<=x-1;n++) if(x%n==0) break; if(n>=x) return 1; else return 0; } main() { int m; for(m=2;m<1000;m+ 阅读全文
posted @ 2019-11-27 17:02 木子欢儿 阅读(2302) 评论(0) 推荐(0)
摘要: #include <stdio.h> int fun(int x) { int a, b, c; a = x / 100; b = x % 100 / 10; c = x % 10; if (x == a * a * a + b * b * b + c * c * c) return 1; else 阅读全文
posted @ 2019-11-27 16:55 木子欢儿 阅读(2675) 评论(0) 推荐(0)
摘要: #include <stdio.h> int max(int x,int y,int z) { if(x>=y) if(x>=z) return x; else return z; else if(y>=z) return y; else return z; } main() { int a,b,c 阅读全文
posted @ 2019-11-27 16:06 木子欢儿 阅读(3153) 评论(0) 推荐(0)
摘要: #include <stdio.h> int max(int x,int y) { if(x>=y) return x; else return y; } main() { int a,b; printf("请输入2个数字:\n"); scanf("%d%d",&a,&b); printf("最大值 阅读全文
posted @ 2019-11-27 15:59 木子欢儿 阅读(1490) 评论(0) 推荐(0)
摘要: 1人脸识别应用场景(验证) 我们先来看看人脸识别的几个应用。第一个是苹果的FACE ID,自从苹果推出FaceID后,业界对人脸识别的应用好像信心大增,各种人脸识别的应用从此开始“野蛮生长”。 事实上,人脸识别技术在很多场景的应用确实可以提升认证效率,同时提升用户体验。前两年,很多机场安检都开始用上 阅读全文
posted @ 2019-11-26 22:26 木子欢儿 阅读(1138) 评论(0) 推荐(0)
摘要: #include<stdio.h> int main() { int i, j, t; for (i = 2; i <= 1000; i++) { int t = 1; for (j = 2; j < i; j++) { if (i%j == 0) { t = 0; break; } } if (t 阅读全文
posted @ 2019-11-26 21:29 木子欢儿 阅读(9117) 评论(3) 推荐(0)
摘要: 存储方法: (1)字符数组赋值 ①初始化 char s[100]={"China'} 或 char s[100]="China' 注意:字符串可以不加{},单字符必须加 int a[10]={1,2,3} ②键盘输入 (1) char a; scanf("%c",&a); scanf("%s",s) 阅读全文
posted @ 2019-11-25 21:28 木子欢儿 阅读(195) 评论(0) 推荐(0)
上一页 1 ··· 69 70 71 72 73 74 75 76 77 ··· 84 下一页