import java.io.*;
public class ExceptionalExample
{
public static void main(String [ ] args) throws IOException
{
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
System.out.println("Enter a number");
String str = br.readLine();
int a = Integer.parseInt(str);
int c = 100/a;
System.out.println("You have Entered: "+ str +" after division : "+c);
}
}
Thursday, 25 January 2018
Related Posts:
Read string in javaimport java.io.*;public class ReadString { public static v… Read More
simple java programspublic class Hello { // start attributes // … Read More
Joption pane in java import javax.swing.*;public class JOptionPaneShowInputDialogExample{&n… Read More
Input example in java import javax.swing.*;public class InputExample{ public static vo… Read More
0 comments: