- 问答
- 2019-05-26 21:32:53 @
package 十二周作业;
import java.util.Scanner;
import java.io.PrintStream;
public class Main {
public static void printMarks(String str) {
int pos=0;
char a[]=str.toCharArray();
for (int i=0;i<a.length;i++) {
if(a[i]==',') {
pos=i+1;
}
}
String marksStr;
marksStr=str.substring(pos);
System.out.println(marksStr);
}
public static void main(String[] args) throws java.io.UnsupportedEncodingException {
PrintStream ps = new PrintStream(System.out, true, "UTF-8");
Scanner in = new Scanner(System.in, "UTF-8");
String str;
str = in.next();
printMarks(str);
}
}
2 条评论
-
小熊 (wlnirvana) LV 8 MOD @ 2019-05-27 17:12:23
可以考虑换IntelliJ编辑器
-
2019-05-26 22:10:14@
什么错误信息?
- 1