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.
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.
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.
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!