importjava.util.Scanner;publicclassMain{Strings;publicstaticvoidmain(String[]args){Mainm=newMain();Scannersr=newScanner(System.in);intn=sr.nextInt();for(;n>0;--n){m.setS(...
import java.util.Scanner;
public class Main {
String s;
public static void main(String[] args) {
Main m=new Main();
Scanner sr=new Scanner(System.in);
int n=sr.nextInt();
for(;n>0;--n){m.setS();m.sc(m.s);}
}
public void setS(){
Scanner sr=new Scanner(System.in);
s=sr.nextLine();
}
public void sc(String s)
{
char a[]=s.toCharArray();
for(int c=0;c
if(a[c]==' ')
System.out.print(',');
else
System.out.print(a[c]);}
}
}
/**************************************************************
Problem: 1089
User: 14110600526
Language: Java
Result: 运行错误
****************************************************************/
展开