Question
Asked by:
naif
naif
Rating : No Rating
Questions Asked: 1
Tutorials Posted: 0
 

$1.00 Operators

Q:
write a program using the Scanner/Switch and other statements if needed which simulates a calculator. your program should take any 2 numbers that are greater than 0 and an operator from the user in the following format: number operator number(-,+,*,/,%)
Enter first number:
Enter second number:
Enter the type of operator:
 


   
   
   
   
rainman asked: I am assuming that this is java?
To which naif said: yes it is and iam working on jcreator v4.5 i hope you can help me?
 
Available Tutorials to this Question
Posted by:
Aks21
Aks21
Rating (351): B-
Questions Asked: 6
Tutorials Posted: 1063, earned $16,637.40
 

$15.00 Complete A+ grade solution...

  • This tutorial hasn't been purchased yet.
  • Posted on Nov 23, 2008 at 10:06:33PM
A:
Preview: ... attached ...

The full tutorial is about 7 words long plus attachments.

Attachments:
Calculator.txt (1K) (Preview)
Posted by:
DoctorD
DoctorD
Rating (9): A-
Questions Asked: 0
Tutorials Posted: 28, earned $420.43
 

$11.00 Java Scanner and Switch tutorial and source code

  • This tutorial hasn't been purchased yet.
  • Posted on Nov 24, 2008 at 10:17:40PM
A:
Preview: ... System.out.print("Operator: ");<br><br> String line = scan.next();<br><br>Assume the operator is the first character on the line:<br> // Extract first character on the line<br> char operator = line.charAt(0);<br><br><br>Declare a variable for the result of the computation. <br> double result=0;<br><br>The switch statement lets you take alternate actio ...

The full tutorial is about 325 words long .
   
Join Now or Log In
Get Tutoring
Get Paid
Academic Honesty