Computer Science, asked by calypsovaldez46, 1 year ago

Java program to convert a decimal value to fraction.

Answers

Answered by anadikedia3
0

Answer:

write the question correctly so That i can right the answer

Answered by harshith2994reddy
0
Here is the code of this program:

import java.io.*;
import java.lang.*;

public class DecimalToFraction{

public static void main(String args[]) throws IOException{
BufferedReader buf =
new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter the decimal number");
String s = buf.readLine();
int in = Integer.parseInt(s);
double d= Double.valueOf(in).doubleValue();
System.out.println("Fraction is:=" + d);
}
}

Software name:- Convert Decimal To Fraction
Similar questions