随笔分类 -  语言入门

摘要:1.说明下列每对scanf格式串是否等价?如果不等价,请指出它们的差异。 (c) "%f"与"%f "。 在 `scanf` 函数中,`"%f"` 和 `"%f "` 这两种格式的区别在于后面的空格。 1. `scanf("%f", &variable);` 这种情况下,`scanf` 会读取并解析 阅读全文
posted @ 2023-05-31 18:23 哎呦_不想学习哟~ 阅读(120) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> using namespace std; int f(int** r, int ** s){ int temp= **r; int temp2=**s; int * z=*r; *r=*s; *s=z; printf("**r= %d\n",**r); prin 阅读全文
posted @ 2023-04-08 11:09 哎呦_不想学习哟~ 阅读(16) 评论(0) 推荐(0) 编辑
摘要:1. >>> odds = [1, 3, 5, 7, 9] >>> [x+1 for x in odds] [2, 4, 6, 8, 10] 2. >>> [x for x in odds if 25 % x == 0] [1, 5] 3 >>> digits = [1, 8, 2, 8] >>>[ 阅读全文
posted @ 2023-03-21 19:57 哎呦_不想学习哟~ 阅读(29) 评论(0) 推荐(0) 编辑
摘要:一:例题 例题1: 题目描述: #递归算法def g(n): """Return the value of G(n), computed recursively. >>> g(1) 1 >>> g(2) 2 >>> g(3) 3 >>> g(4) 10 >>> g(5) 22 >>> from co 阅读全文
posted @ 2023-02-15 23:00 哎呦_不想学习哟~ 阅读(32) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示