上一页 1 ··· 323 324 325 326 327 328 329 330 331 ··· 407 下一页
摘要: linux系统awk命令拆分文件。 1、 [root@centos7 test2]# ls file.txt [root@centos7 test2]# cat file.txt -rw-r--r-- 1 root 52457 Aug 10 2019 ngx_http.c -rw-r--r-- 1 阅读全文
posted @ 2021-05-07 18:58 小鲨鱼2018 阅读(622) 评论(0) 推荐(0)
摘要: c语言 6-5 #include <stdio.h> int sumup(int n) { int sum = 0; int i; for(i = 1; i <= n; i++) { sum += i; } return sum; } int main(void) { int i; puts("pl 阅读全文
posted @ 2021-05-07 10:14 小鲨鱼2018 阅读(85) 评论(0) 推荐(0)
摘要: c语言6-4 #include <stdio.h> int sqr(int a) { return a * a; } int pow4(int a) { return sqr(sqr(a)); } int main(void) { int i; puts("please input an integ 阅读全文
posted @ 2021-05-07 10:08 小鲨鱼2018 阅读(78) 评论(0) 推荐(0)
摘要: c语言 6-3 #include <stdio.h> int cube(int a) { return a * a * a; } int main(void) { int i; puts("please input an integer."); printf("i = "); scanf("%d", 阅读全文
posted @ 2021-05-07 10:03 小鲨鱼2018 阅读(89) 评论(0) 推荐(0)
摘要: 输出三个数中的最小值。 #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 阅读(1837) 评论(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 阅读(83) 评论(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 阅读(4679) 评论(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 阅读(686) 评论(0) 推荐(0)
摘要: 函数定义: 函数调用: 函数定义:函数头和函数体。 函数头:包括返回值类型、函数名和形参声明 函数体:复合语句,仅在摸个函数中使用的变量,原则上应在该函数中声明和使用,但要注意不能声明和形参同名的变量,否则会发生变量名冲突的错误。 #include <stdio.h> int max2(int a, 阅读全文
posted @ 2021-05-04 10:52 小鲨鱼2018 阅读(2023) 评论(0) 推荐(0)
上一页 1 ··· 323 324 325 326 327 328 329 330 331 ··· 407 下一页