Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

SeishinryokuFPS

Member
  • Content Count

    1
  • Joined

  • Last visited

Awards


This user doesn't have any awards

About SeishinryokuFPS

  • Title
    Newbie
  1. so the output is, after i'm done with inputting an item in item number 1 its price and quantity the second item skips and lets me input the price and quantity here's the output: Zero DEGREE MALL 999 HDS BUILDING, Butuan City 09096082036 Current date is 9/13/2014 Current time is 6 : 54 : 15 Enter Item Number 1: Logitech G502 Enter Price: 3100.00 Enter Quantity: 1 Enter Item Number 2: Enter Price: 3600 Enter Quantity: 1 Enter Item Number 3: Enter Price: 1000 Enter Quantity: 1 Enter Item Number 4: Enter Price: 2000 Enter Quantity: 1 Enter Item Number 5: Enter Price: 1000 Enter Quantity: 1 Payment: 20000 Enter Item Number 1: Logitech G502 Enter Price: 3100.0 Enter Quantity 1 Enter Item Number 2: Enter Price: 3600.0 Enter Quantity 1 Enter Item Number 33: Enter Price: 1000.0 Enter Quantity 1 Enter Item Number 4: Enter Price: 2000.0 Enter Quantity 1 Enter Item Number 5: Enter Price: 1000.0 Enter Quantity: 1 Payment: 20000.0 Total: 10700.0 Payment: 20000.0 Here's your Change: 9300.0 THANK YOU!!!! here's the code: import java.io.*;import java.util.*;import java.util.stream.*;public class ReceiptProgram { public static Scanner Sei = new Scanner(System.in); public static void main(String[] args) throws FileNotFoundException{int day, month, year; int second, minute, hour; GregorianCalendar date = new GregorianCalendar(); day = date.get(Calendar.DAY_OF_MONTH); month = date.get(Calendar.MONTH); year = date.get(Calendar.YEAR); second = date.get(Calendar.SECOND); minute = date.get(Calendar.MINUTE); hour = date.get(Calendar.HOUR); System.out.println(" Zero DEGREE MALL "); System.out.println(" 999 HDS BUILDING, Butuan City "); System.out.println(" 09096082036 "); System.out.println("Current date is "+(month+1)+"/"+day+"/"+year); System.out.println("Current time is "+hour+" : "+minute+" : "+second); System.out.println(" "); input();} public static Object Seishin;public static void input()throws FileNotFoundException{PrintWriter Seishinryoku = new PrintWriter("Receipt.txt");String item1;String item2;String item3;String item4;String item5;int number1;int number2;int number3;int number4;int number5;double price1;double price2;double price3;double price4;double price5;double payment;double total;double change; System.out.println("Enter Item Number 1: ");item1 = Sei.nextLine();System.out.println("Enter Price: ");price1 = Sei.nextDouble();System.out.println("Enter Quantity: ");number1 = Sei.nextInt(); System.out.println("Enter Item Number 2: ");item2 = Sei.nextLine();System.out.println("Enter Price: ");price2 = Sei.nextDouble();System.out.println("Enter Quantity: ");number2 = Sei.nextInt(); System.out.println("Enter Item Number 3: ");item3 = Sei.nextLine();System.out.println("Enter Price: ");price3 = Sei.nextDouble();System.out.println("Enter Quantity: ");number3 = Sei.nextInt(); System.out.println("Enter Item Number 4: ");item4 = Sei.nextLine();System.out.println("Enter Price: ");price4 = Sei.nextDouble();System.out.println("Enter Quantity: ");number4 = Sei.nextInt(); System.out.println("Enter Item Number 5: ");item5 = Sei.nextLine();System.out.println("Enter Price: ");price5 = Sei.nextDouble();System.out.println("Enter Quantity: ");number5 = Sei.nextInt();System.out.println("Payment: ");payment = Sei.nextDouble(); System.out.println("Enter Item Number 1: " +item1);System.out.println("Enter Price: " +price1);System.out.println("Enter Quantity " +number1); System.out.println("Enter Item Number 2: " +item2);System.out.println("Enter Price: " +price2);System.out.println("Enter Quantity " +number2); System.out.println("Enter Item Number 33: " +item3);System.out.println("Enter Price: " +price3);System.out.println("Enter Quantity " +number3); System.out.println("Enter Item Number 4: " +item4);System.out.println("Enter Price: " +price4);System.out.println("Enter Quantity " +number4);System.out.println("Enter Item Number 5: " +item5); System.out.println("Enter Price: " +price5);System.out.println("Enter Quantity: " +number5);System.out.println("Payment: " +payment); Seishinryoku.println(" " +item1);Seishinryoku.println(" " +price1);Seishinryoku.println(" " +number1); Seishinryoku.println(" " +item2);Seishinryoku.println(" " +price2);Seishinryoku.println(" " +number2); Seishinryoku.println(" " +item3);Seishinryoku.println(" " +price3);Seishinryoku.println(" " +number3); Seishinryoku.println(" " +item4);Seishinryoku.println(" " +price4);Seishinryoku.println(" " +number4); Seishinryoku.println(" " +item5);Seishinryoku.println(" " +price5);Seishinryoku.println(" " +number5);total = price1 * number1 + price2 * number2 + price3 * number3 + price4 * number4 + price5 * number5;System.out.println("Total: " +total);System.out.println("Payment: " +payment);change = payment - total;System.out.println("Here's your Change: " +change); Seishinryoku.flush();Seishinryoku.close();System.out.println("THANK YOU!!!!"); } }
×