Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: I was woundering if anyone could help me with Calculator programming.

  1. #1
    Junior Member
    Join Date
    Oct 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default I was woundering if anyone could help me with Calculator programming.

    I am supposed to write a program Calculator that uses Logic and looping.
    The program is supposed to use addition subtraction Multiplication and modolo.
    The starting value is 0
    I have to choose from the menu which option to use.
    after choosing the option the program must save the value and option choosen then repeat with the option of using the previous values again.


    Any help at all would be much appreciated. PM me please and i can share the code i have started so far.


  2. #2
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 140 Times in 135 Posts

    Default Re: I was woundering if anyone could help me with Calculator programming.

    My experience here is that if you want the best and quickest help, you will want to post your code here and ask your specific questions here in the forum.

  3. #3
    Junior Member
    Join Date
    Oct 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: I was woundering if anyone could help me with Calculator programming.

    import java.util.Scanner;

    public class Calculator
    {

    public static void main (String args [])
    {
    Scanner keyboard = new Scanner(System.in);
    int +=0, -=0, *=0, %=Modolo

    System.out.println("CURRENT VALUE:");

    System.out.println("+ - Addition");
    System.out.println("- - Subtraction");
    System.out.println("* - Multiplication");
    System.out.println("% - Modolo");
    System.out.println("x - Exit");
    System.out.println(" Enter the Menu slection:");


    }

    }


    is my code... looking at it again i have to change my int's and add some chars.....

    I also think i have to use do and while statements.

  4. #4
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 140 Times in 135 Posts

    Default Re: I was woundering if anyone could help me with Calculator programming.

    You'll want to check out the Java tutorials to start with I think and check out the sections on declaring and using variables. You can find the tutorial here: The Java Tutorials Really Big Index. The section on declaring and using variables can be found here: Language Basics.

    Hope this helps and good luck!

Similar Threads

  1. Blackjack programming error (programmer is new to programming)
    By JSingh in forum What's Wrong With My Code?
    Replies: 4
    Last Post: September 27th, 2012, 09:13 PM
  2. android programming vs game programming using java
    By vgoel38 in forum Android Development
    Replies: 4
    Last Post: September 8th, 2012, 05:48 PM
  3. [SOLVED] Calculator
    By ikocijan in forum What's Wrong With My Code?
    Replies: 2
    Last Post: June 26th, 2012, 05:54 AM
  4. Replies: 0
    Last Post: December 12th, 2011, 03:17 PM
  5. [SOLVED] Calculator help
    By Bradshjo in forum What's Wrong With My Code?
    Replies: 2
    Last Post: November 1st, 2010, 04:27 PM