Day20

1.输入3个数a,b,c,按大小顺序输出。  程序分析:利用指针方法。

package com.dodoke.demo;  
/** 
 * 输入3个数a,b,c,按大小顺序输出。程序分析:利用指针方法。 
 * @author 26966 
 * 
 */  
public class Day20 {  
    public static void main(String[] args) {  
        int[] arrays = { 99, 111, 277 };  
        for (int i = arrays.length; --i >= 0;) {  
            for (int j = 0; j < i; j++) {  
                if (arrays[j] > arrays[j + 1]) {  
                    int temp = arrays[j];  
                    arrays[j] = arrays[j + 1];  
                    arrays[j + 1] = temp;  
                }  
            }  
        }  
        for (int n = 0; n < arrays.length; n++)  
            System.out.println(arrays[n]);  
    }    
}  

2 javascript编程

实现在标题栏上动态显示当前时间的效果

<html>  
      <head>  
          <title>新建网页 1</title>  
      </head>  
      <body οnlοad="showTime()">  
          <script>  
              function showTime(){  
              now=new Date();  
              display=now.toLocaleString();  
             document.title=display;  
             setTimeout("showTime()",1000)  
             }  
         </script>  
     </body>  
 </html>  
3.

 MySQL语句查询

查询计算机成绩低于95的学生信息

id    namesexbirthdepartmentaddress
902张老二1986 中文系     北京市昌平区 
904李四1990 英语系   辽宁省阜新市 
906王六1988计算机系   湖南省衡阳市

SELECT* FROM student

WHERE id IN

(SELECT stu_id FROM score

WHERE c_name="计算机" and grade<95);



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值