上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 29 下一页
摘要: //更换a b的值,而p1和p2 的 值不变 void swap(int *p1, int *p2){ int tmp; tmp = *p1; *p1 = *p2; *p2 = tmp; } int main() { int a, b; int *pointer_1, *pointer_2; pri 阅读全文
posted @ 2021-11-16 13:22 江南王小帅 阅读(88) 评论(0) 推荐(0)
摘要: //a b 值不变,p1 p2的值改变 #pragma warning(disable :4996) #include <stdio.h>int main() { int *p1, *p2, *p, a, b; printf("请输入两个整数\n"); scanf("%d %d", &a, &b); 阅读全文
posted @ 2021-11-16 11:50 江南王小帅 阅读(392) 评论(0) 推荐(0)
摘要: 调用外部应用程序时分为阻塞和非阻塞,这里采用非阻塞,因为想调用哪个程序就调用哪个程序 方法如下: 使用Qprocess的startDetached()方法,当前程序关闭时,调用的外部程序能够照常运行。 #include <QProcess> QProcess::startDetached( "E:\ 阅读全文
posted @ 2021-11-10 08:26 江南王小帅 阅读(1838) 评论(0) 推荐(0)
摘要: #add PASS import osfilepath = os.path.abspath('.')def eachFile(filepath): pathDir = os.listdir(filepath) #获取当前路径下的文件名,返回List for s in pathDir: newDir= 阅读全文
posted @ 2021-11-08 13:21 江南王小帅 阅读(272) 评论(0) 推荐(0)
摘要: file = open("*.txt",'r') content = file.read() file.close() pos = content.find( "2.4G MAC address" ) if pos != -1: content = content[:pos] + "\n" +" " 阅读全文
posted @ 2021-11-08 13:20 江南王小帅 阅读(540) 评论(0) 推荐(0)
摘要: windows下使用批处理命令快速关闭显示器 锁屏代码 BAT代码分享 复制代码 到新建txt文件,,将后缀改为bat,需要息屏的时候双击下就OK @echo offecho 10秒钟后自动熄灭屏幕 并 锁屏 ::10秒延时 (11-1 = 10秒 。127.1是本地地址127.0.0.1的简写。 阅读全文
posted @ 2021-11-05 13:22 江南王小帅 阅读(4469) 评论(0) 推荐(0)
摘要: int main() { float average(float array[], int n); float arr1[5] = {1,2,3,4,5}; float arr2[10] = { 1,2,3,4,5 ,1,2,3,4,5 }; float aver1, aver2; aver1 = 阅读全文
posted @ 2021-11-05 09:11 江南王小帅 阅读(238) 评论(0) 推荐(0)
摘要: int main() { float average(float array[10]); float score[10], aver; int i; std::cout << "请输入10个数值:"; printf("\n"); for ( i = 0; i < 10; i++) { scanf(" 阅读全文
posted @ 2021-11-05 08:52 江南王小帅 阅读(680) 评论(0) 推荐(0)
摘要: int main() { int fac(int n); int n; int y; printf("input an integer number:"); scanf("%d", &n); y = fac(n); printf("%d! = %d \n",n, y); return 0; } in 阅读全文
posted @ 2021-11-04 16:09 江南王小帅 阅读(595) 评论(0) 推荐(0)
摘要: int main() { //递归函数 int age(int n); printf("%d\n", age(5)); return 0; } int age(int n) { int c; if (n == 1) c = 10; else { c = age(n - 1) + 2; } retur 阅读全文
posted @ 2021-11-03 17:08 江南王小帅 阅读(16) 评论(0) 推荐(0)
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 29 下一页