gnopaste

Sorry for this ugly message. We are searching for some translators.
Please send me an eMail or jabber: t4c@im.digital-bit.ch
Got: de, en, pl, ro, lu, ru, es - Need: everything else

Name
[java]Parole
Scriptlanguage
Java
Tabwidth
4
Date
03/13/2010 01:41:18 pm
IP
151.32.237.64

[http://capiamoinsieme.bloog.it] input di tre parole e stampa verticale (parallela)

  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5.  
  6. package javaapplication1;
  7. import java.util.*;
  8.  
  9. /**
  10. *
  11. * @author Administrator
  12. */
  13. public class Parole {
  14.  
  15.     public static void main(String[] args) {
  16.  
  17.         Scanner in= new Scanner(System.in);
  18.         System.out.println("Digita 3 parole: ");
  19.         String p1=in.next();
  20.         String p2=in.next();
  21.         String p3=in.next();
  22.         int max =p1.length();
  23.         if(max<p2.length()) max=p2.length();
  24.         if(max<p3.length()) max=p3.length();
  25.         for(int i=0;i<max; i++){
  26.             System.out.print("\n");
  27.             char c;
  28.             c=(i<p1.length())?p1.charAt(i):' ';
  29.             System.out.print(" "+c);
  30.             c=(i<p2.length())?p2.charAt(i):' ';
  31.             System.out.print(" "+c);
  32.             c=(i<p3.length())?p3.charAt(i):' ';
  33.             System.out.print(" "+c);
  34.  
  35.         }
  36.         }
  37.     }
submitter » gnopaster | imprint « imprint     
» Terms of use «
» digital bit dot ch - t4c's new home «