Write a function that obtains a numerator and denominator from user and checks if they will form a proper fraction or not.
Answers
Answered by
0
Answer:
java soln:
import java.util.Scanner;
class solution {
public static void main [String args]{
Scanner sc = new Scanner (System.in);
sout("enter numerator");
int numerator = sc.nextInt();
sout("enter denominator");
int denominator = sc.nextInt();
if(numerator<denominator){ sout("proper fraction"); }
else{ sout("improper fraction");}
}
}
Similar questions