public void readNumber()
	{
		try {
			
//			System.out.println(MAXLENGTH);
			System.out.print("Enter a number : ");
			
			String num = input.readLine();
			number = Double.parseDouble(num);
			
						
			dotPosition = num.indexOf(".");
//			System.out.println(dotPosition);
			
			if(dotPosition == -1){
				sReal = num;
				sDecimal = "0";
//				System.out.println(sDecimal);
			}
			else{
			sReal = num.substring(0, dotPosition);
//			System.out.println(sReal);
			sDecimal = num.substring(dotPosition+1, num.length());
//			System.out.println(sDecimal);
		} 
			lReal = Long.parseLong(sReal);
			
			if(sDecimal.length() > MAXLENGTH){
				System.out.println("\nYou may only enter a maximum of 19 digits after the decimal point.");
				throw new NumberFormatException();
			}
			
			lDecimal = Long.parseLong(sDecimal);
			
			//-- following section is for the round off function
			long roundOff = Math.round(number);
			
			if(roundOff == lReal){ // checks if the round off value for the real part
								   // remains unchanged during the round off function
				int index = ROUNDOFFINDEX;
				long tempVal = 0;
				long roundOffDecimal = 0;
				
				decimalReverse = true;
				long decRev = reverse(lDecimal);
				decimalReverse = false;
				
				while(index > 0){
					tempVal = decRev % 10;
					if(index == 1){
						if(tempVal >= 5)
							roundOffDecimal++;
						break;
					}
					roundOffDecimal = (roundOffDecimal * 10) + tempVal;
					decRev /= 10;
					index--;
				}
				
				lDecimal = roundOffDecimal;
				sDecimal = new Long(lDecimal).toString();
			}
			else
			{
				lReal = roundOff;
				lDecimal = 0;
			}
			//-- round off section ends here
			length = sReal.length();
//			System.out.println(length);
		}
		catch (IOException e) {
			e.printStackTrace();
			waitAndExit();
		}
		catch (NumberFormatException e){
			System.out.println("You did not enter a valid number.\nRestart the application to start again...\n\nPRESS ENTER TO EXIT");
			waitAndExit();
		}
	}