gnopaste
Sorry for this ugly message. We are searching for some translators.
Please take a look here
Thanks to all translators, you're doing a great job!
Userdata
Name
[java]Parole
Scriptlanguage
Java
Tabwidth
4
Date
03/13/2010 01:41:18 pm
IP
151.32.237.64
Description
[http://capiamoinsieme.bloog.it] input di tre parole e stampa verticale (parallela)
Code (
Hide rownumbers
)
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package
javaapplication1;
import
java.util.*;
/**
*
* @author Administrator
*/
public
class
Parole {
public
static
void
main(String[] args) {
Scanner in=
new
Scanner(System.in);
System.out.println("Digita 3 parole: ");
String p1=in.next();
String p2=in.next();
String p3=in.next();
int
max =p1.length();
if
(max<p2.length()) max=p2.length();
if
(max<p3.length()) max=p3.length();
for
(
int
i=0;i<max; i++){
System.out.print("\n");
char
c;
c=(i<p1.length())?p1.charAt(i):
' '
;
System.out.print(" "+c);
c=(i<p2.length())?p2.charAt(i):
' '
;
System.out.print(" "+c);
c=(i<p3.length())?p3.charAt(i):
' '
;
System.out.print(" "+c);
}
}
}
submitter »
gnopaster
|
imprint
« imprint
»
Terms of use
«