All pastes #385166 Raw Edit

Miscellany

public javascript v1 · immutable
·published 2007-03-07 17:43 UTC
rendered paste body
//Muhammad Norat//TaskMNimport java.util.Scanner;public class TaskMN{	final static double BOLTS = 0.25;	final static double NUTS = 0.15;	final static double WASHERS = 0.10;	public static void main (String [] args)throws Exception	{		Scanner in = new Scanner (System.in);		//Initiate Variables		String name = " ";		String codeName = "Bobs Discount Bolts";		codeName = codeName.toUpperCase();  //[Cool123] I pulled this one out of the loop (Coz no use converting it each time)		int bolts = 0;		int nuts = 0;		int washers = 0;		System.out.println("Please enter the name of the customer ");		name = in.next();			while (!name.equalsIgnoreCase("ZZZ"))         //[Cool123] No need for extra brackets			{			System.out.println("How many BOLTS are you purchasing ? ");			bolts = in.nextInt();			System.out.println("How many NUTS are you purchasing ? ");			nuts = in.nextInt();			System.out.println("How many WASHERS are you purchasing ? ");			nuts = in.nextInt();									System.out.println("Please enter the name of the customer ");			name = in.next();						}	}}