標題:
資料輸入 (四)
[打印本頁]
作者:
tonyh
時間:
2012-12-1 16:06
標題:
資料輸入 (四)
import java.util.Scanner;
public class ch44
{
public static void main(String args[])
{
String a;
int b;
float c;
Scanner input=new Scanner(System.in);
System.out.print("請輸入一字串: ");
a=input.next();
System.out.println(a);
System.out.print("請輸入一整數: ");
b=input.nextInt();
System.out.println(b);
System.out.print("請輸入一浮點數: ");
c=input.nextFloat();
System.out.println(c);
}
}
複製代碼
作者:
尤泓鈞
時間:
2012-12-1 16:11
import java.util.Scanner;
public class ch44
{
public static void main(String args[])
{
String a;
int b;
float c;
Scanner input=new Scanner(System.in);
System.out.print("請輸入一字串:");
a=input.next();
System.out.println(a);
System.out.print("請輸入一整數:");
b=input.nextInt();
System.out.println(b);
System.out.print("請輸入一浮點數:");
c=input.nextFloat();
System.out.println(c);
}
}
複製代碼
作者:
t2364705
時間:
2012-12-1 16:13
import java.util.Scanner;
public class ch44
{
public static void main(String args[])
{
String a;
int b;
float c;
Scanner input=new Scanner(System.in);
System.out.print("請輸入一字串: ");
a=input.next();
System.out.println(a);
System.out.print("請輸入一整數: ");
b=input.nextInt();
System.out.println(b);
System.out.print("請輸入一浮點數: ");
c=input.nextFloat();
System.out.println(c);
}
}
複製代碼
作者:
lon
時間:
2012-12-1 16:16
import java.util.*;
public class scanner
{
public static void main(String args[])
{
int a;
String b;
float c;
System.out.print("請輸入一整數:");
a=Scanner.nextInt();
System.out.println(a);
System.out.print("請輸入一字串:");
b=Scanner.next();
System.out.println(b);
System.out.print("請輸入一浮點數:");
c=Scanner.nextFloat();
System.out.println(c);
}
}
複製代碼
作者:
黃博鴻
時間:
2012-12-1 16:17
import java.util.Scanner;
public class ch44
{
public static void main(String args[])
{
String a;
int b;
float c;
Scanner input=new Scanner(System.in);
System.out.print("請輸入一個字串: ");
a=input.next();
System.out.println(a);
System.out.print("請輸入一個整數: ");
b=input.nextInt();
System.out.println(b);
System.out.print("請輸入一個浮點數: ");
c=input.nextFloat();
System.out.println(c);
}
}
複製代碼
作者:
t3742238
時間:
2012-12-1 16:19
import java.util.Scanner;
public class ch44
{
public static void main(String args[])
{
String a;
int b;
float c;
Scanner input=new Scanner(System.in);
System.out.print("請輸入一串字串");
a=input.next();
System.out.println(a);
System.out.print("請輸入一串整數");
b=input.nextInt();
System.out.println(b);
System.out.print("請輸入一串浮點數");
c=input.nextFloat();
System.out.println(c);
}
}
複製代碼
作者:
蔡昀佑
時間:
2012-12-1 16:39
import java.util.Scanner;
public class ch44
{
public static void main(String args[])
{
String a;
int b;
float c;
Scanner input=new Scanner(System.in);
System.out.print("請輸入一字串: ");
a=input.next();
System.out.println(a);
System.out.print("請輸入一整數: ");
b=input.nextInt();
System.out.println(b);
System.out.print("請輸入一浮點數: ");
c=input.nextFloat();
System.out.println(c);
}
}
複製代碼
作者:
粘靖瑜
時間:
2012-12-1 16:46
import java.util.Scanner;
public class ch44
{
public static void main(String args[])
{
String a;
int b;
float c;
Scanner input=new Scanner(System.in);
System.out.print("請輸入一字串: ");
a=input.next();
System.out.println(a);
System.out.print("請輸入一整數: ");
b=input.nextInt();
System.out.println(b);
System.out.print("請輸入一浮點數: ");
c=input.nextFloat();
System.out.println(c);
}
}
複製代碼
作者:
劉漢文
時間:
2012-12-15 11:23
import java.util.Scanner;
public class ch44
{
public static void main(String args[])
{
String a;
int b;
float c;
Scanner input=new Scanner(System.in);
System.out.print("請輸入一字串: ");
a=input.next();
System.out.println(a);
System.out.print("請輸入一整數: ");
b=input.nextInt();
System.out.println(b);
System.out.print("請輸入一浮點數: ");
c=input.nextFloat();
System.out.println(c);
}
}
複製代碼
歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://seed.istak.org.tw/)
Powered by Discuz! 7.2