Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class EsPortal {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- String items;
- double itemsPrice = 0;
- int itemsStock = 50;
- System.out.println("ES Companies Portal – Cashier App 3");
- System.out.println("===================================");
- do {
- System.out.println("Input item's name [5..30 character]");
- items = scan.nextLine();
- } while(!(items.length() >= 5 && items.length()<=30));
- do {
- System.out.println("Input item's price [use decimal number 20...2000]");
- try{
- itemsPrice = scan.nextDouble();
- }catch (Exception e) {}
- }while(!(itemsPrice >=20 && itemsPrice <=2000));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement