herrDeng網內搜尋
自訂搜尋
Ads
訂閱:
張貼留言 (Atom)
熱門文章
-
計算你的BMI
-
1. 利用遞迴input n算2^n 2. 用C算GCD(3333,456)
-
請用 C/C++/java寫一簡易程式
-
需要練習的Java程式:
-
33, 45, 87, 99, 27 算平均
-
BMI (Body Mass Index)= 體重 (kg) / 身高 ^2(m 2 ) 在台灣,行政院衛生署乃根據其相關研究,於2002年4月公佈台灣成人肥胖標準: BMI<18.5 為過輕, 18.5≦BMI<24 為正常體重, 24≦BMI<27 為過重, BM...
-
一、 試利用switch case由程式中直接輸入一個1~7 之間的整數day,代表星期一到星期日。若day 的值是1,則印出 "星期一",若day 的值是2,則印出 "星期二",若day 的值是7,則印出 "星期日",...
-
用 C/C++算上學期加權平均
45 則留言:
public class hello2 {
public static void main(String[] args) {
int a[]=new int[5];
for (int i=0; i<a.length; i++)
{
a[i]=(int)(99*Math.random());
System.out.println(a[i]);
}
}
}
import java.util.Random;
public class HELLO {
public static void main(String[] args) {
int[] a = new int[5];
Random rand=new Random();
for(int i=0;i<=4;i++)
{
a[i]=rand.nextInt(99);
}
for(int i=0;i<=4;i++)
{
System.out.println(a[i]);
}
}
}
public class pppp{
public static void main(String[] args) {
int [] a=new int[5];
for (int i=0;i<a.length;i++){
a[i]=(int)(Math.random()*99);
System.out.println("0-99亂數:"+a[i]);
}
}
}
public class ost{
public static void main(String[] args) {
int [] a=new int[5];
for (int i=0;i<a.length;i++){
a[i]=(int)(Math.random()*99);
System.out.println("0-99亂數:"+a[i]);
}
}
}
public class Hello502 {
public static void main(String[] args) {
int [] a=new int[5];
for (int i=0;i<a.length;i++){
a[i]=(int)(Math.random()*99);
System.out.println("0-99亂數:"+a[i]);
}
}
}
public class asd{
public static void main(String[] args){
int[] a=new int[5];
for(int i=0;i<a.length;i++)
{
a[i]=(int)(99*Math.random());
System.out.println(a[i]);
}
}
}
public class asd{
public static void main(String[] args){
int[] a=new int[5];
for(int i=0;i<a.length;i++)
{
a[i]=(int)(100*Math.random());
System.out.println(a[i]);
}
}
}
import java.util.Random;
public class ags {
public static void main(String[] args) {
int[] a = new int[5];
Random rand=new Random();
for(int i=0;i<=4;i++)
{
a[i]=rand.nextInt(100);
}
for(int i=0;i<=4;i++)
{
System.out.println(a[i]);
}
}
}
import java.util.Random;
public class test {
static void main(String[] args) {
int[] a = new int[5];
Random rand=new Random();
for(int i=0;i<=4;i++)
{
a[i]=rand.nextInt(99);
}
for(int i=0;i<=4;i++)
{
System.out.println(a[i]);
}
}
}
import java.util.Random;
public class hello {
public static void main(String[] args) {
int[] a = new int[5];
Random rand=new Random();
for(int i=0;i<=4;i++)
{
a[i]=rand.nextInt(99);
}
for(int i=0;i<=4;i++)
{
System.out.println(a[i]);
}
}
}
public class test {
public static void main(String[] args) {
int[] a = { 5, 7, 8, 2, 3 };
int temp;
for(int j=0;j<a.length;j++)
{
for(int i=0;i<a.length-1;i++)
{
if(a[i]>a[i+1])
{
temp=a[i];
a[i]=a[i+1];
a[i+1]=temp;
}
}
}
for(int i=0;i<a.length;i++)
{
System.out.println(a[i]);
}
System.out.println("MaxValue:"+a[4]);
System.out.println("MinValue:"+a[0]);
}
}
public class hello{
public static void main(String[] args){
int[]a=new int [5];
for(int i=0;1<a.length;i++){
a[i]=(int)(Math.random()*99);
System.out.println("0~99亂數:"+a[i]);
}
}
}
public class test2
{
public static void main(String[] args)
{
int a[]=new int[5];
for (int i=0; i<a.length; i++)
{
a[i]=(int)(100*Math.random());
System.out.println(a[i]);
}
}
}
import java.util.Random;
public class hello {
public static void main(String[] args) {
int[] a = new int[5];
Random rand=new Random();
for(int i=0;i<a.length;i++)
{
a[i]=rand.nextInt(99);
}
for(int i=0;i<a.length;i++)
{
System.out.println(a[i]);
}
}
}
import java.util.Random;
public class hello {
public static void main(String[] args) {
int[] a = new int[5];
Random rand=new Random();
for(int i=0;i<a.length;i++)
{
a[i]=rand.nextInt(99);
}
for(int i=0;i<a.length;i++)
{
System.out.println(a[i]);
}
}
}
public class test2
{
public static void main(String[] args)
{
int a[]=new int[5];
⋯⋯ for (int i=0; i<a.length; i++)
{
a[i]=(int)(100*Math.random());
System.out.println(a[i]);
}
}
}
public class test2
{
public static void main(String[] args)
{
int a[]=new int[5];
⋯⋯ for (int i=0; i<a.length; i++)
{
a[i]=(int)(100*Math.random());
System.out.println(a[i]);
}
}
}
public class hello503{
public static void main(String[] args)
{
int a[]=new int[5];
for (int i=0; i<a.length; i++)
{
a[i]=(int)(100*Math.random());
System.out.println(a[i]);
}
}
}
public class XD{
static int min(int[] a){
int x=a[0];
for(int i=1;i<a.length;i++)
⋯⋯ {
if(x>a[i])
x=a[i];
}
return x;
}
static int max(int[] a){
int x=a[0];
for(int i=1;i<a.length;i++)
{
if(x<a[i])
x=a[i];
}
return x;
}
public static void main(String[] args){
int[] a={5,7,8,2,3};
System.out.println("min="+min(a));
System.out.println("max="+max(a));
}
}
public class cc
{
public static void main(String[] args)
{
int a[]=new int[5];
for (int i=0; i<a.length; i++)
{
a[i]=(int)(100*Math.random());
System.out.println(a[i]);
}
}
}
public class test2
{
public static void main(String[] args)
{
int a[]=new int[5];
⋯⋯ for (int i=0; i<a.length; i++)
{
a[i]=(int)(100*Math.random());
System.out.println(a[i]);
}
}
}
public class test2
{
public static void main(String[] args)
{
int a[]=new int[5];
for (int i=0; i<a.length; i++)
{
a[i]=(int)(100*Math.random());
System.out.println(a[i]);
}
}
}
public class test
{
public static void main(String[] args)
{
int a[]=new int[5];
for (int i=0; i<a.length; i++)
{
a[i]=(int)(100*Math.random());
System.out.println(a[i]);
}
}
}
public class test2
{
public static void main(String[] args)
{
int a[]=new int[5];
⋯⋯ for (int i=0; i<a.length; i++)
{
a[i]=(int)(100*Math.random());
System.out.println(a[i]);
}
}
}
public class random0503 {
public static void main(String[] args) {
// TODO code application logic here
int [] a=new int[5];
for (int i=0; i<a.length; i++)
{
a[i]=(int)(100*Math.random());
System.out.println("0~99亂數:"+i+":"+a[i]);
}
}
}
public class hello2
{
public static void main(String[] args)
{
int a[]=new int[5];
for (int i=0; i<a.length; i++)
{
a[i]=(int)(100*Math.random());
System.out.println(a[i]);
}
}
}
import java.util.Random;
public class hello503 {
public static void main(String[] args){
int[] a = new int[100];
for(int i=0;i<a.length;i++)
{
a[i]=(int)(Math.random()*100);
System.out.println("0-99亂數:"+1+":"+a[i]);
}
System.out.println("++++++++++++++++++++++++++++++++++++++");
Random rnd=new Random();
for(int i=0;i<a.length;i++)
{
a[i]=rnd.nextInt(99);
System.out.println("0-99亂數:"+1+":"+a[i]);
}
}
}
import java.util.*;
public class MaxNMin {
public static void main(String[] args) {
int [] a=new int[100];
for (int i=0;i<a.length;i++)
{
a[i]=(int)(Math.random()*100);
System.out.println("0-99亂數:"+i+":"+a[i]);
}
System.out.println("+++++++++++++++++++++++++++++++");
Random rnd=new Random();
}
}
public class test2
{
public static void main(String[] args)
{
int a[]=new int[5];
⋯⋯ for (int i=0; i<a.length; i++)
{
a[i]=(int)(100*Math.random());
System.out.println(a[i]);
}
}
}
public class b33016
{
public static void main(String[] args){
int a[]=new int[5];
for (int i=0; i<a.length; i++)
{
a[i]=(int)(100*Math.random());
System.out.println(a[i]);
}
}
}
public class hello2
{
public static void main(String[] args)
{
int a[]=new int[5];
for (int i=0; i<a.length; i++)
{
a[i]=(int)(100*Math.random());
System.out.println(a[i]);
}
}
}
import java.util.*;
class bb {
public static void main (String[] args) {
int [] a= new int[100];
for (int i=0;i<a.length;i++)
{
a[i]=(int)(Math.random()*100);
System.out.println("0-99亂數:"+i+":"+a[]);
}
}
}
import java.util.*;
public class hello503 {
public static void main(String[] args) {
int [] a=new int[100];
for (int i=0;i<a.length;i++)
{
a[i]=(int)(Math.random()*100);
System.out.println("0-99亂數:"+i+":"+a[i]);
}
}
}
public class d
{
public static void main(String[] args)
{
int a[]=new int[5];
for (int i=0; i<a.length; i++)
{
a[i]=(int)(100*Math.random());
System.out.println(a[i]);
}
}
}
import java.util.*;
class bb {
public static void main (String[] args) {
int [] a= new int[100];
for (int i=0;i<a.length;i++)
{
a[i]=(int)(Math.random()*100);
System.out.println("0-99亂數:"+i+":"+a[]);
}
}
}
class test {
public static void main(String[] args) {
int[] a=new int[5];
for(int i=0;i<a.length;i++)
{
a[i]=(int)(100*Math.random());
System.out.println(a[i]);
}
}
}
class test {
public static void main(String[] args) {
int[] a=new int[5];
for(int i=0;i<a.length;i++)
{
a[i]=(int)(100*Math.random());
System.out.println(a[i]);
}
}
}
import java.util.*;
class a{
public static void main (String[] args)
int [] a=new int[100];
for (int i=0'i<a.length;i++)
{
a[i]=(int)(Math.random()*100);
System.out.println("0-99亂數:"++":"+[i]);
}
System.out.println("+++++++++++++++++++++++++");
Random rnd=new Random();
for (int i=0;i<a.length;i++)
{
a[i]=rnd.nextInt(99);
System.out.println("0-99亂數:"+i":"a+[i]);
}
}
import java.util.*;
public class qwe {
public static void main(String[] args) {
int [] a=new int[100];
for (int i=0;i<a.length; i++)
{
a[i]=(int) (Math.random()*100);
System.out.println("0-99亂數:"+i+":"+a[i]);
}
}
}
import java.util.*;
public class asd {
public static void main(String[] args) {
int a[]=new int[100];
Random rnd=new Random();
for(int i=0;i<a.length;i++)
{
a[i]=rnd.nextInt(99);
System.out.println("0-99亂數:"+i+":"+a[i]);
}
}
}
public class random
{
public static void main(String[] args)
{
int a[]=new int[5];
for (int i=0; i<a.length; i++)
{
a[i]=(int)(100*Math.random());
System.out.println("亂數0~99:"+a[i]);
}
}
}
import java.util.Random;
public class hello503 {
public static void main(String[] args){
int[] a = new int[100];
for(int i=0;i<a.length;i++)
{
a[i]=(int)(Math.random()*100);
System.out.println("0-99亂數:"+1+":"+a[i]);
}
System.out.println("++++++++++++++++++++++++++++++++++++++");
Random rnd=new Random();
for(int i=0;i<a.length;i++)
{
a[i]=rnd.nextInt(99);
System.out.println("0-99亂數:"+1+":"+a[i]);
}
}
}
import java.util.Random;
public class test {
static void main(String[] args) {
int[] a = new int[5];
Random rand=new Random();
for(int i=0;i<=4;i++)
{
a[i]=rand.nextInt(99);
}
for(int i=0;i<=4;i++)
{
System.out.println(a[i]);
}
}
}
import java.util.Random;
public class HELLO {
public static void main(String[] args) {
int[] a = new int[5];
Random rand=new Random();
for(int i=0;i<=4;i++)
{
a[i]=rand.nextInt(99);
}
for(int i=0;i<=4;i++)
{
System.out.println(a[i]);
}
}
}
import java.util.Random;
public class test {
static void main(String[] args) {
int[] a = new int[5];
Random rand=new Random();
for(int i=0;i<=4;i++)
{
a[i]=rand.nextInt(99);
}
for(int i=0;i<=4;i++)
{
System.out.println(a[i]);
}
}
}
張貼留言