import java.util.Scanner; public class java{ public static void main(String [] args){ int n,i; int tab[]=new int [25]; Scanner sa=new Scanner(System.in); do{ System.out.println("donner la taille \n"); n=sa.nextInt(); }while(n>25 || n<=0); for(i=0;i<n;i++){ System.out.println("donner T["+i+"]"); tab[i]=sa.nextInt(); System.out.println("\n"); } for(i=0;i<n;i++){ System.out.println(tab[i]); System.out.println("\n"); } } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter