上一页 1 ··· 137 138 139 140 141 142 143 144 145 ··· 180 下一页
摘要: import pyaudio import wave from PIL import ImageGrab import cv2 import threading import time from numpy import array from moviepy.editor import * impo 阅读全文
posted @ 2021-05-02 17:24 myrj 阅读(631) 评论(0) 推荐(0) 编辑
摘要: C语言虽然没有限制 if else 能够处理的分支数量,但当分支过多时,用 if else 处理会不太方便,而且容易出现 if else 配对出错的情况。例如,输入一个整数,输出该整数对应的星期几的英文表示: #include <stdio.h> int main(){ int a; printf( 阅读全文
posted @ 2021-04-29 06:19 myrj 阅读(5948) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main() { int a;float b; scanf("a=%d,b=%f",&a,&b); printf("%d,%f\n",a,b); printf("%d\n",a+(int)b); getchar(); } 应该输入:a=45,b=3.6 阅读全文
posted @ 2021-04-28 16:49 myrj 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-04-28 14:34 myrj 阅读(22) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main() { int a;float b; scanf("a=%d,b=%f",&a,&b); printf("%d,%f\n",a,b); printf("%d\n",a+(int)b); getchar(); } 阅读全文
posted @ 2021-04-27 18:24 myrj 阅读(499) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> //强制类型转换 //写法:(类型标识符)变量;(类型标识符)常量;(类型标识符)(表达式);三种格式 main() { float a=7.5f; long b=100L; printf("%d,%d\n",sizeof(a),sizeof(b)); prin 阅读全文
posted @ 2021-04-27 06:41 myrj 阅读(321) 评论(0) 推荐(0) 编辑
摘要: float类型%d输出 float a=7.5f; 如果用printf("%d",a);输出的是0。 但float型用%d输出是否一定是0呢,答案肯定不都是0; 为什么 7.5 用%d输出的是0?分析如下: 首先来了解下printf的输出格式,int 和 long int 都是32位的,用%d输出; 阅读全文
posted @ 2021-04-27 06:20 myrj 阅读(5791) 评论(0) 推荐(0) 编辑
摘要: float a=7.5f; //7.5为浮点数 long b=100L; //100为长整数 int c=0123;// 0123为8进制数 int d=0x123;//0x123为16进制数 阅读全文
posted @ 2021-04-27 06:00 myrj 阅读(443) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> //赋值时类型原则:赋值号右边表达式值 变量 常量的类型最好与左边变量的类型相一致 //二者不相同时,C编译系统会自动实现数据类型转换 //转换原则:将赋值号右边的表达式值的类型转换成左边变量相同的类型后再赋值 //当左边变量的数据类型比右边表达式值的类型长时, 阅读全文
posted @ 2021-04-26 06:29 myrj 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-04-25 10:56 myrj 阅读(579) 评论(0) 推荐(0) 编辑
上一页 1 ··· 137 138 139 140 141 142 143 144 145 ··· 180 下一页