public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input=new Scanner(System.in);
System.out.println("请输入一个数值:");
int a=input,nextInt(); //The method nextInt() is undefined for the type text1
int i=1;
do{
System.out.println("你好,美女!"+i);
i++;
}while(i<=a);
}
}作者: ZHAOWEI 时间: 2014-5-11 21:32
import java.util.Scanner;
public class Text1 {//注意规范,类名首字母要改成大写啊 Text1
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input=new Scanner(System.in);
System.out.println("请输入一个数值:");
int a=input.nextInt(); //这里input.nextInt(); 你input后面的符号写错了,应该是. 你写成,号了
int i=1;
do{
System.out.println("你好,美女!"+i);
i++;
}while(i<=a);
}