Search:

Type: Posts; User: YourCrazyFriend

Search: Search took 0.17 seconds.

  1. Re: How can I create a global or local script terminater?

    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;...
  2. How can I create a global or local script terminater?

    I tried this,


    System.out.println("Enter your number: ");
    nr1 = scn.nextDouble();
    if(nr1.equals("stop") || nr1.equals("Stop")){
    String nr1 = nr1(double);...
  3. Re: Need help with creating simple calculater

    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,...
  4. Re: Need help with creating simple calculater

    I fixed it :D Thank you so much :)
  5. Re: Need help with creating simple calculater

    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
  6. Re: Need help with creating simple calculater

    I'm not really into Strings. How do I use them?
  7. Re: Need help with creating simple calculater

    Not quite sure. I'm here cause I need some help finishing this one. How would you have done it?
  8. Re: Need help with creating simple calculater

    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 /.
  9. Re: Need help with creating simple calculater

    This is what I've gotten to, but I need a declaration for my mode variable. Anyone knows what kind?
  10. Need help with creating simple calculater

    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[]){...
Results 1 to 10 of 10