Task - Menu-driven Calculator #11
Replies: 6 comments
-
|
const operator = prompt('Enter operator ( either +, -, * ,/ or q to quit ): '); let result; |
Beta Was this translation helpful? Give feedback.
-
|
window.alert("Hello to the Calculator"); operation = Number(operation); if (typeof operation == "number"){ }else{ |
Beta Was this translation helpful? Give feedback.
-
|
`function calculator() { }` |
Beta Was this translation helpful? Give feedback.
-
Calculater<script> window.alert("Hello to the Calculator"); let op = prompt("Operation list \n1: Addition\n2:Subtraction\n3:Multiplication\n4:Division\n5:Quit") op = Number(op);hi i tried but after options,, it is not giving output. |
Beta Was this translation helpful? Give feedback.
-
|
choice = prompt("Enter the type of operation you want to perfrom : +,-,/,* or q to quit"); if (choice == 'q'){ } |
Beta Was this translation helpful? Give feedback.
-
<title>Menu-driven-calculater</title>
var value; } } #plus{ #reno{ #edit{ } |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Write a menu-driven program to implement a simple calculator. Ask the users to input two numbers and a choice of which operation to perform from the following menu: -
Choose an option:
Display the results of the respective calculations. Print goodbye message when the user decides to quit.
Beta Was this translation helpful? Give feedback.
All reactions