I don't know if I did it the correct way, but this is where I have gotten so far. This code is not working yet.
Scanner scn = new Scanner(System.in);
double nr1, nr2, answer;...
Type: Posts; User: YourCrazyFriend
I don't know if I did it the correct way, but this is where I have gotten so far. This code is not working yet.
Scanner scn = new Scanner(System.in);
double nr1, nr2, answer;...
I tried this,
System.out.println("Enter your number: ");
nr1 = scn.nextDouble();
if(nr1.equals("stop") || nr1.equals("Stop")){
String nr1 = nr1(double);...
Ended up with making this:
import java.util.Scanner;
class apples{
public static void main(String args[]){
Scanner scn = new Scanner(System.in);
double firstnumber, secondnumber,...
I fixed it :D Thank you so much :)
I added a string above: String str;
But now, at
I get "Incompatible operand types String and char"
Why is that?
If I change it to
I'm not really into Strings. How do I use them?
Not quite sure. I'm here cause I need some help finishing this one. How would you have done it?
The mode would be for the method user input. What is written in the input in "Enter method: ", will determine if you are going to +, -, * or /.
This is what I've gotten to, but I need a declaration for my mode variable. Anyone knows what kind?
Hey,
I made myself a small calculator, but I want to to choose what to use instead of only using plus.
import java.util.Scanner;
class calculator{
public static void main(String args[]){...