上一页 1 ··· 319 320 321 322 323 324 325 326 327 ··· 403 下一页
摘要: 输出三个数中的最小值。 #include <stdio.h> int min3(int a, int b, int c) { int min = a; if(b < min) min = b; if(c < min) min = c; return min; } int main(void) { i 阅读全文
posted @ 2021-05-07 10:00 小鲨鱼2018 阅读(1826) 评论(0) 推荐(0)
摘要: 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 阅读(77) 评论(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 阅读(36) 评论(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 阅读(4648) 评论(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 阅读(682) 评论(0) 推荐(0)
摘要: 函数定义: 函数调用: 函数定义:函数头和函数体。 函数头:包括返回值类型、函数名和形参声明 函数体:复合语句,仅在摸个函数中使用的变量,原则上应在该函数中声明和使用,但要注意不能声明和形参同名的变量,否则会发生变量名冲突的错误。 #include <stdio.h> int max2(int a, 阅读全文
posted @ 2021-05-04 10:52 小鲨鱼2018 阅读(2004) 评论(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 阅读(183) 评论(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 阅读(882) 评论(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 阅读(61) 评论(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 阅读(44) 评论(0) 推荐(0)
上一页 1 ··· 319 320 321 322 323 324 325 326 327 ··· 403 下一页