62,614
社区成员
发帖
与我相关
我的任务
分享
public class Test {
public static void main(String [] args){
FileWriter fw=null;
try{
fw=new FileWriter("d:\\dd.txt");
String s;
DecimalFormat dfInt=new DecimalFormat("000000");
for(int i=0;i<11;i++){
for(int j=0;j<5;j++){
for(int k=0;k<3;k++){
s="c"+dfInt.format(k)+",p"+dfInt.format(j)+",s"+dfInt.format(i);
fw.write(s);
fw.write(13);
fw.write(10);
}
}
}
fw.close();
}catch(IOException e){
e.printStackTrace();
}
}
}
public class Test {
public static void main(String [] args){
FileWriter fw=null;
try{
fw=new FileWriter("d:\\dd.txt");
String s;
for(int i=0;i<10;i++){
for(int j=0;j<5;j++){
for(int k=0;k<3;k++){
s="c"+k+",p"+j+",s"+i;
fw.write(s);
fw.write(13);
fw.write(10);
}
}
}
fw.close();
}catch(IOException e){
e.printStackTrace();
}
}
}