sorry for not posting my problem briefly,actually sir. its not my only problem..
ill post the code
public class Main
private static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
public static void main(String args)throws IOException
System.out.print("Enter a number : ");
System.out.print("Enter the second number : ");
System.out.print("Enter the third number : ");
(num<=9) /* this part is running perfectly down to the
decimalPlaces=decimalPlaces+1; third condition,if the number is <=999
System.out.print("The first number has "+decimalPlaces+" decimalplaces");
the program is totally running it doesnt have syntax erros
but the problem is ,its not running the way i expect to.
the first three condition is running perfectly as i want to.. but in the last condition,
if i entered number below 0 (negative numbers), it prints the condition ("CANNOT PROCEED")
BUT IT ALSO PRINTS THE OTHER STRING ("the first number has " +decimalPlaces + " ");
the only thing that i want to happen is this
if i entered positive numbers then it will print the decimal places according to the condition that i make ,and it will print the string ("The first number has " +decimalPlaces+ " son on...");
but if i entered negative numbers , the last condition will automatically do its job and print ONLY the string ("CANNOT PROCEED");
just having some structure problem here..
anyway sir.. tnx !!