Java99乘法表,100以内质数,关键字和数据结构

Java的关键字

Java的数据类型,范围和默认值,注意数据溢出

经典题目

 package com.oracle.*;
 3 public class * {
 5     public static void x1(){
 6         for (int i = 1; i <=9; i++) {
 7                     for (int j = 1; j <= i; j++) {
 8                         System.out.print(j+"*"+i+"="+j*i+"	");
 9                     }
10                     System.out.println();
11                 } 
13                 /*99乘法表*/
15     }
16     
17     public static void x2(){
19         int n=100;
20         int s=n;
21         for(int i=1;i<=n;i++){            
22             if (s%i==0) {
23                 System.out.println(i+" ");
25             }
26         }
28     }
29     /*100以内的质数*/
30   
31     public static void main(String[] args) {
32         x1();
33         x2();
36     }
39 }

  

 
oraclepeixun
原文地址:https://www.cnblogs.com/dldrjyy13102/p/7444432.html