Advertisement
Tecnelm

Untitled

Oct 17th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.81 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class tt
  4. {
  5.  
  6.     public static void main(String[] args)
  7.     {
  8.           Scanner read = new Scanner(System.in);
  9.          
  10.           int nblignes=read.nextInt();
  11.           read.nextLine();                            //j'ai rajouter un read.nextline comme ca tu va a la ligne dans ta prise         
  12.                                                       //d'acquisition voir il y avais besoin sur eclypse mais a tester sur france ioi
  13.          
  14.           String[] texte= new String[(nblignes)];
  15.         //  System.out.println(texte.length);
  16.              
  17.           for(int i=0; i<texte.length;i++){
  18.             //  System.out.println(i);
  19.               texte[i]=read.nextLine();
  20.           }  
  21.          
  22.           for(int i=0;i<texte.length;i=i+2){
  23.               System.out.println(texte[i]);
  24.           }
  25.           read.close();
  26.  
  27.     }
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement