# Fraction Calculator app

```public class Calculator
{
public static void main(String[] args)
{
String choice = "";
String userFract = "0";
String userFract2 = "0";
Scanner scan = new Scanner(System.in);
String fract = "0";
int clearCounter = 0;

String add = "a"; String multiply = "m";
String subtract = "s"; String divide = "d";
String reciprocal = "r"; String clear = "c";
String reverse = "n"; String proper = "p";
String improper = "i"; String quit = "q";

while(!choice.equals("q"))
{
if(clearCounter == 0)
{
System.out.print("Enter a fraction: ");
userFract = scan.nextLine();

clearCounter++;
}

NewFraction currentFract = NewFraction.parseNewFraction(userFract);
fract = currentFract.toString();
System.out.println(fract);

System.out.println("subtract:    s,  reverse sign:     n");
System.out.println("multiply:    m,  proper display:   p");
System.out.println("divide:      d,  improper display: i");
System.out.println("reciprocal:  r,  quit:             q");
System.out.print("-->");
choice = scan.nextLine();
System.out.println("");

{
System.out.print("Enter another fraction: ");
userFract2 = scan.nextLine();
NewFraction newFract = NewFraction.parseNewFraction(userFract2);

System.out.println(Fract.Proper());
}

if(choice.equals(clear))
{
clearCounter--;
}

}

}
}
```

I am working on a program for a fraction calculator, and like my NewFraction file works properly but I am having trouble wit the calculator file.so my file compiles and executes but the output is weird. It displaces the right answer and on the next line, it also displays the original fraction? Idk what to do.. HELP!

You need to replace this line

```System.out.println(Fract.Proper());
```

with

```currentFract = Fract;
```

The fraction Fract will be printed out at the start of the next iteration of the loop.