上一页 1 ··· 283 284 285 286 287 288 289 290 291 ··· 367 下一页
摘要: 1、 #include <stdio.h> int min2(int a, int b) { int min = a; if(b < min) min = b; return min; } int main(void) { int x, y; puts("please input two integ 阅读全文
posted @ 2021-05-06 23:20 小鲨鱼2018 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 第一个java程序。 package hello; public class Hello { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("Hello W 阅读全文
posted @ 2021-05-06 21:56 小鲨鱼2018 阅读(30) 评论(0) 推荐(0) 编辑
摘要: c语言中自定义函数计算x的n次方。 1、直接输出形式 #include <stdio.h> int main(void) { int i, x, n; int tmp = 1; puts("please input the values of x and n."); printf("x = "); 阅读全文
posted @ 2021-05-06 19:04 小鲨鱼2018 阅读(4305) 评论(0) 推荐(0) 编辑
摘要: c语言中while语句控制程序循环的次数 1、 #include <stdio.h> int main(void) { int i; puts("please input an integer."); printf("i = "); scanf("%d", &i); while(i-- > 0) { 阅读全文
posted @ 2021-05-06 18:33 小鲨鱼2018 阅读(583) 评论(0) 推荐(0) 编辑
摘要: 函数定义: 函数调用: 函数定义:函数头和函数体。 函数头:包括返回值类型、函数名和形参声明 函数体:复合语句,仅在摸个函数中使用的变量,原则上应在该函数中声明和使用,但要注意不能声明和形参同名的变量,否则会发生变量名冲突的错误。 #include <stdio.h> int max2(int a, 阅读全文
posted @ 2021-05-04 10:52 小鲨鱼2018 阅读(1766) 评论(0) 推荐(0) 编辑
摘要: python中创建字典、字典的访问 1、 >>> test1 = {"aaa":111,"bbb":222,"ccc":333} >>> test1 {'aaa': 111, 'bbb': 222, 'ccc': 333} >>> type(test1) <class 'dict'> >>> 2、 阅读全文
posted @ 2021-05-03 20:26 小鲨鱼2018 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 1、 问题 >>> test2 = dict((('F',20),('i',40),('s',80))) Traceback (most recent call last): File "<pyshell#171>", line 1, in <module> test2 = dict((('F',2 阅读全文
posted @ 2021-05-03 19:17 小鲨鱼2018 阅读(806) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> #define NUMBER 1000 int main(void) { int i, j, num, a[NUMBER], max, b[11] = {0}; do { printf("num = "); scanf("%d", &num); if(nu 阅读全文
posted @ 2021-05-03 17:25 小鲨鱼2018 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> int main(void) { int i, j, k, a[2][4][3], b[4][3] = {0}; puts("please input the elements of the array."); for(i = 0; i < 2; i++) 阅读全文
posted @ 2021-05-03 15:15 小鲨鱼2018 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 1、 #include <stdio.h> int main(void) { int i, j, a[6][2], b[2] = {0}, c[6] = {0}; puts("please input the elements of array a."); for(i = 0; i < 6; i++ 阅读全文
posted @ 2021-05-03 12:46 小鲨鱼2018 阅读(37) 评论(0) 推荐(0) 编辑
上一页 1 ··· 283 284 285 286 287 288 289 290 291 ··· 367 下一页