herrDeng網內搜尋

自訂搜尋

Ads

2014年9月10日 星期三

請完成一簡易java程式

請完成一簡易java程式,當中至少含有迴圈或條件敘述。



Eclipse設定請參考

34 則留言:

B10233089錢玟薏 提到...

package hello;
import java.util.Random;
public class ex1 {
public static void main(String[] args) {
Random rnd=new Random();
int i=0;
for (i=1;i<5;i++){
int j=1;
for (j=1;j<i;j++)
System.out.print("$");
System.out.println();
}
}
}

B10033116 陳柏諺 提到...

package b10033116_01;
public class Ex05 {
public static void main(String[] args) {
int n, sum, d, a;
sum = 0;
a = 2;
d = 2;
n = 5;
for (int i = 1; i <= n; i++) {
sum = sum + a;
a = a + d;
}
System.out.print("sum=" + sum);

}

}

Unknown 提到...

B10233178

package loop;

public class practice {

//1+2+3+...+100=?

public static void main(String[] args){

int sum=0;
for(int x=1;x<=100;x++){
sum+=x;
}
System.out.println(sum);
}

}

b10233072黃君寰 提到...

package aa;

public class gg123 {

public static void main(String[] args) {
System.out.println("你好。");

}

}

b10211216洪資恒 提到...

package hello;

public class hello123 {

public static void main(String[] args) {
System.out.println("你好。");

}

}

Y10211027張君弘 提到...

public class Hw1 {
public static void main(String[] args) {
for (int i = 0; i < 5; i++) {
System.out.println("我是胖虎~我是孩子王~");
}
}
}

B10233103蔡登曜 提到...

public class NewClass {
public static void main(String[] args){
for(int i=10 ; i>0 ; i-- ){
for(int j=10 ; j>i ; j-- ){
System.out.println("z");
}
for(int a=0 ; a<i ; a++ ) {
System.out.println("x");
}
}

B10233061吳興強 提到...

public class XXX {
public static void main(String[] args){
int sum=0;
for(int x=1;x<=100000000;x++){
sum+=x;
}
System.out.print(sum);
}

}

B10233082唐偉強 提到...


public class day910 {


public static void main(String[] args) {
System.out.println("3,5,5,5,8,10 數字中排第三的是?");
int [] a = {3,5,5,5,8,10};
for(int i=0;i<a.length;i++);
int Arr = a[3];
System.out.println("排第三個的是:"+Arr);
}

}

B10233090 林清隆 提到...

public class hello {
public static void main(String[] args) {
for (int i = 0; i < 5; i++) {
System.out.println("你好");
}
}
}

B10233097 邱宥甄 提到...

public class ONE {

public static void main(String[] args) {
for (int i = 0; i < 4; i++) {
System.out.println("啾啾");
}
}
}

B10233098 陳緣 提到...

public class OE {

public static void main(String[] args) {
for (int i = 0; i < 5; i++) {
System.out.println("程式");
}
}
}

B10233069連于傑 提到...

package hello910;

public class Ex1{

public static void main (String[] args){

int i=0;
do{
i++;
System.out.println("*");
} while (i<10);
}
}

B10233080陳芊慈 提到...

package hello;

public class kk123 {

public static void main(String[] args) {
System.out.println("哆啦A夢");

}

}

B10233070劉思涵 提到...

package hello;

public class SS {

public static void main(String[] args) {
System.out.println("小美");

}

}

B10233084 陳億如 提到...

public class dfg {

public static void main(String[] args) {
for (int i = 0; i < 4; i++) {
System.out.println("哈哈哈哈");
}
}
}

B10233067江珮璇 提到...

public class ex1 {
public static void main(String[] args) {
int i=0,j=0;
for(i=1;i<=5;i++){
for(j=1;j<=i;j++)
System.out.print("A");
System.out.println();
}
}
}

b10033028 提到...

public class NewClass {
public static void main(String[] args){
for(int i=10 ; i>0 ; i-- ){
for(int j=10 ; j>i ; j-- ){
System.out.println("z");
}
for(int a=0 ; a<i ; a++ ) {
System.out.println("x");
}
}

b10033028 劉名翔 提到...

public class NewClass {
public static void main(String[] args){
for(int i=10 ; i>0 ; i-- ){
for(int j=10 ; j>i ; j-- ){
System.out.println("z");
}
for(int a=0 ; a<i ; a++ ) {
System.out.println("x");
}
}

匿名 提到...

public class NewClass {
public static void main(String[] args){
for(int i=10 ; i>0 ; i-- ){
for(int j=10 ; j>i ; j-- ){
System.out.println("z");
}
for(int a=0 ; a<i ; a++ ) {
System.out.println("x");
}
}

B10233062 黃聖評 提到...

package hellosha;

public class sha1{

public static void main (String[] args){

int i=0;
do{
i++;
System.out.println("安");
} while (i<8);
}
}

B10233110徐上竣 提到...

package java;

public class java123 {

public static void main(String[] args) {
System.out.println("HelloJava");

}

}

B10233064 莊英霆 提到...

package hello;

public class hello123 {

public static void main(String[] args) {
System.out.println("I love Java");

}

}

B10233087 黃少洋 提到...

package hello;

public class hello1 {

public static void main(String[] args) {
System.out.println("hello");

}

}

B10233063 張宜禎 提到...

package hello;
import java.uti1.Random;
public class ex01 {
public static void main(String[] args) {
Random rnd=new Random();
int i=0;
for (i=1;i<5;i++){
int j=1;
for (j=1;j<i;j++)
System.out.print("$");
System.out.println();
}
}
}

B10233081 藍立凱 提到...

package hello;
import java.util.Random;
public class ex2 {
public static void main(String[] args) {
Random rnd=new Random();
int i=0;
for (i=1;i<5;i++){
int j=1;
for (j=1;j<i;j++)
System.out.print("$");
System.out.println();
}
}
}

B10233075 謝如華 提到...

package hello;
import java.util.Random;
public class ex5 {
public static void main(String[] args) {
Random rnd=new Random();
int i=0;
for (i=1;i<5;i++){
int j=1;
for (j=1;j<i;j++)
System.out.print("$");
System.out.println();
}
}
}

B10233174 廖庭 提到...

package hello;
import java.util.Random;
public class ex3 {
public static void main(String[] args) {
Random rnd=new Random();
int i=0;
for (i=1;i<5;i++){
int j=1;
for (j=1;j<i;j++)
System.out.print("$");
System.out.println();
}
}
}

B10233076呂姿瑩 提到...

package ex;

public class ex1 {

public static void main(String[] args) {
for(int i=4;i>0;i--){
for(int j=0;j<i;j++){
System.out.print("A");
}
System.out.println();
}

}

}

B10233096 提到...

public class hello {
public static void main(String[] args) {
for (int i = 0; i < 5; i++) {
System.out.println("GooD");
}
}
}

B10233095李元宏 提到...


public class homework01 {


public static void main(String[] args) {
for(int i=0;i<5;i++){
System.out.println("hello");
}

}

}

b10233068邱佳函 提到...

public class ex1 {

public static void main(String[] args) {
for (int i = 0; i < 4; i++) {
System.out.println("hello");
}
}

B10233092許凡耕 提到...

package java;

public class java123 {

public static void main(String[] args) {
System.out.println("HelloJava");

}

}

B10033024 沈旻翰 提到...

package hello;
import java.util.Random;
public class ex1 {
public static void main(String[] args) {
Random rnd=new Random();
int i=0;
for (i=1;i<5;i++){
int j=1;
for (j=1;j<i;j++)
System.out.print("$");
System.out.println();
}
}
}

Related Posts Plugin for WordPress, Blogger...

熱門文章