yea try something like
int repeat;
do{
your calc code
Output, would you like to continue yes [1] or no [0]
user enters value for repeat
}while(repeat.equals(1));
Now you can enter as many as you want instead of 3. It is fairly simple.
You loop through the first time, at the end the user enters a value for repeat. If it equals one then repeat again. You can use a char or a string, and get more advanced with something like
repeat = repeat.toLowerCase();
(I hate java btw

)