Update MyIO.java
Acréscimo de float como parâmetro da print e println
This commit is contained in:
parent
ff7968080e
commit
39eee5ed2d
|
|
@ -21,6 +21,13 @@ class MyIO {
|
||||||
}catch(UnsupportedEncodingException e){ System.out.println("Erro: charset invalido"); }
|
}catch(UnsupportedEncodingException e){ System.out.println("Erro: charset invalido"); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void print(float x){
|
||||||
|
try {
|
||||||
|
PrintStream out = new PrintStream(System.out, true, charset);
|
||||||
|
out.print(x);
|
||||||
|
}catch(UnsupportedEncodingException e){ System.out.println("Erro: charset invalido"); }
|
||||||
|
}
|
||||||
|
|
||||||
public static void print(double x){
|
public static void print(double x){
|
||||||
try {
|
try {
|
||||||
PrintStream out = new PrintStream(System.out, true, charset);
|
PrintStream out = new PrintStream(System.out, true, charset);
|
||||||
|
|
@ -59,6 +66,13 @@ class MyIO {
|
||||||
}catch(UnsupportedEncodingException e){ System.out.println("Erro: charset invalido"); }
|
}catch(UnsupportedEncodingException e){ System.out.println("Erro: charset invalido"); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void println(float x){
|
||||||
|
try {
|
||||||
|
PrintStream out = new PrintStream(System.out, true, charset);
|
||||||
|
out.println(x);
|
||||||
|
}catch(UnsupportedEncodingException e){ System.out.println("Erro: charset invalido"); }
|
||||||
|
}
|
||||||
|
|
||||||
public static void println(double x){
|
public static void println(double x){
|
||||||
try {
|
try {
|
||||||
PrintStream out = new PrintStream(System.out, true, charset);
|
PrintStream out = new PrintStream(System.out, true, charset);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue