Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package supermercado;
- import java.util.ArrayList;
- import java.util.Scanner;
- import java.io.BufferedReader;
- import java.io.InputStreamReader;
- import java.io.IOException;
- public class Supermercado {
- public static void main(String[] args) throws IOException {
- // TODO Auto-generated method stub
- String cadena;
- Fecha f1 = new Fecha(0, 0, 0);
- double precio;
- String nombre;
- ArrayList<String> arrayList = new ArrayList();
- String[] arrInicio;
- BufferedReader lee = new BufferedReader(new InputStreamReader(System.in));
- do {
- cadena = lee.readLine();
- arrayList.add(cadena);
- } while (cadena.length() !=0);{
- lee.close();
- }
- for (int i = 0; i < arrayList.size(); i++) {
- if (i == arrayList.size() - 1) {
- System.out.println(i + ". " + arrayList.get(i));
- } else {
- System.out.println(i + ". " + arrayList.get(i) + " ");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement