摘要: #include <stdio.h> //找出一维数组中最大最小的数 int max(int *array, int len); //原型声明 int min(int *array, int len); //原型声明 int main() { int a[] = {1, 2, 4, 7, 10, 1 阅读全文
posted @ 2020-05-26 10:03 profesor 阅读(686) 评论(0) 推荐(0)
摘要: 一维数组的创建方法 //第一种创建array的方法: String[] familyMembers = new String[4]; familyMembers[0] = "jerry"; familyMembers[1] = "elaine"; familyMembers[2] = "george 阅读全文
posted @ 2020-05-25 22:45 profesor 阅读(688) 评论(0) 推荐(0)
摘要: public class Arrays { public static void main(String[] args) //返回值设为String { for (String name : names()) System.out.println(name); } public static Str 阅读全文
posted @ 2020-05-25 22:40 profesor 阅读(182) 评论(0) 推荐(0)
摘要: //一维随机数组 public class RandomArray { public static void main(String[] args) { int[] nums = new int[(int) (Math.random() * 10)]; System.out.println("len 阅读全文
posted @ 2020-05-25 22:08 profesor 阅读(804) 评论(0) 推荐(0)
摘要: //我们知道: Java有Math.random()来随机选择[0,1)内的任意数 //随机取数 // import java.util.Random; public class Choice { public static void main(String[] args) { Random rdm 阅读全文
posted @ 2020-05-25 21:56 profesor 阅读(2724) 评论(0) 推荐(0)
摘要: Array of arrays: #include <stdio.h> #include <string.h> int main() { char tracks[][100] = { "will the protesters in American cities bring progress", " 阅读全文
posted @ 2020-05-25 16:27 profesor 阅读(195) 评论(0) 推荐(0)
摘要: #!/bin/bash for item in * do if [ -f $item ] then echo $item fi done for do done if then (elif...then...) (else) fi 阅读全文
posted @ 2020-05-24 22:53 profesor 阅读(110) 评论(0) 推荐(0)
摘要: import java.util.Scanner; public class Reader { public static void main(String[] args) { Scanner scan = new Scanner(System.in); //创建对象 System.out.prin 阅读全文
posted @ 2020-05-24 22:45 profesor 阅读(431) 评论(0) 推荐(0)
摘要: import static java.lang.System.out; public class hello { public static void main(String[] args) { boolean bool = false; while (false) //这里如果直接换成while 阅读全文
posted @ 2020-05-24 22:29 profesor 阅读(227) 评论(0) 推荐(0)
摘要: Tech's push to teach coding isn't about kids' success – it's about cutting wages Ben Tarnoff Today’s hi-tech wages threaten Silicon Valley’s bottom li 阅读全文
posted @ 2020-05-23 20:07 profesor 阅读(168) 评论(0) 推荐(0)