calculator code

Solutions on MaxInterview for calculator code by the best coders in the world

showing results for - "calculator code"
Ismael
03 Aug 2017
1<!DOCTYPE HTML>
2<html lang="en">
3<head>
4<meta charset="utf-8">
5<title>Calculator Made by Sanjith </title>
6<link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
7<style>
8    * {
9        font-family: 'Inconsolata', monospace;
10        color: rgb(0, 0, 0);
11    }
12    body {
13        background: linear-gradient(to right, rgb(24, 184, 168), rgb(118, 190, 50));;
14    }
15    .container {
16        width: 320px;
17        background: linear-gradient(to right, rgb(173, 58, 173), rgb(184, 63, 26));;
18        margin: 120px auto;
19    }
20    table {
21        width: 100%;
22        border-color: #09646407;
23        background: linear-gradient(to right, rgb(184, 24, 37), rgb(78, 13, 230));;
24    }
25    td {
26        width: 25%;
27        border-color: rgba(0, 0, 0, 0.363);
28    }
29    button {
30        width: 100%;
31        height: 70px;
32        font-size: 24px;
33        background: linear-gradient(to right, rgb(151, 11, 151), rgb(190, 94, 50));;      
34        border: none;
35    }
36    #inputLabel {
37        height: 120px;
38        font-size: 40px;
39        vertical-align: bottom;
40        text-align: right;
41        padding-right: 16px;
42        background: linear-gradient(to right, rgb(4, 65, 88), rgb(226, 68, 47));;
43    }
44</style>
45</head>
46<body>
47<div class="container">
48    <table border="1" cellspacing="0">
49        <tr>
50            <td colspan="4" id="inputLabel">0</td>
51        </tr>
52        <tr>
53            <td colspan="3"><button onclick="pushBtn(this);">AC</button></td>
54            <td><button onclick="pushBtn(this);">/</button></td>
55        </tr>
56        <tr>
57            <td><button onclick="pushBtn(this);">7</button></td>
58            <td><button onclick="pushBtn(this);">8</button></td>
59            <td><button onclick="pushBtn(this);">9</button></td>
60            <td><button onclick="pushBtn(this);">*</button></td>
61        </tr>
62        <tr>
63            <td><button onclick="pushBtn(this);">4</button></td>
64            <td><button onclick="pushBtn(this);">5</button></td>
65            <td><button onclick="pushBtn(this);">6</button></td>
66            <td><button onclick="pushBtn(this);">-</button></td>
67        </tr>
68        <tr>
69            <td><button onclick="pushBtn(this);">1</button></td>
70            <td><button onclick="pushBtn(this);">2</button></td>
71            <td><button onclick="pushBtn(this);">3</button></td>
72            <td><button onclick="pushBtn(this);">+</button></td>
73        </tr>
74        <tr>
75            <td colspan="2"><button onclick="pushBtn(this);">0</button></td>
76            <td><button onclick="pushBtn(this);">.</button></td>
77            <td><button onclick="pushBtn(this);">=</button></td>
78        </tr>
79    </table>
80</div>
81 
82<script>
83    var inputLabel = document.getElementById('inputLabel');
84     
85    function pushBtn(obj) {
86         
87        var pushed = obj.innerHTML;
88         
89        if (pushed == '=') {
90            // Calculate
91            inputLabel.innerHTML = eval(inputLabel.innerHTML);
92             
93        } else if (pushed == 'AC') {
94            // All Clear
95            inputLabel.innerHTML = '0';
96             
97        } else {
98            if (inputLabel.innerHTML == '0') {
99                inputLabel.innerHTML = pushed;
100                 
101            } else {
102                inputLabel.innerHTML += pushed;   
103            }
104        }
105    }
106</script>
107</body>
108</html>
Thor
06 Jul 2017
1x = input("first number")
2y = input("second number")
3z = input("do you want to multiply, minus, divide or add? (x,-,/,+)")
4
5y = int(y)
6x = int(x)
7
8if z == "+":
9    print (x + y)
10
11if z == "/":
12    print (x / y)
13
14if z == "x":
15    print (x * y)
16
17if z == "-":
18    print (x - y)
19
20else:
21    print("use x,-,/ or + next time!")
Ryland
04 Apr 2018
1a=int(input("first number:"))
2b=int(input("second number:"))
3c=input("what you want +,-,*,/: please input sign:")
4d=("+")
5e=("-")
6f=("*")
7g=("/")
8if c==d:
9    print(f"your answer is: ({a+b})")
10elif c==e:
11    print(f"your answer is:({a-b})")
12elif c==f:
13    print(f"your answer is:({a*b})")
14elif c==g:
15    print(f"your answer is:({a/b})")
16print ("thank you")
17
queries leading to this page
how to code for a calculatorwhat code do calculators usejavascript simple calculatorcalculator in htmlhow to get a awnser out of your html calculatorcalculator using javascript codehow make a calculator javascript step by stephow to create a webpage where users can do basic calculations in javascriptsimple calculator using javascript and htmlcode to make a calculatorhow to make a calculator javascripthow to make online calculator in htmljavascript calculator without input fieldcomplete calculator in javascripthtml and javascript calculatormake calculator in pythonhow to program the enter button in a calculator javascripthow to make a calculator with pythonhow to make a calcualtor in htmlcalculator code for javascripthtml calculatorjavascript for calculatorcalulator html css jscalculating efence using pythonhow to do clulater interactive in javascriptcalculator html codebasic calculation app in htmlcalculator 5dhow to create function a calculator javascriptexamples of calculations in pythoncalculatore codemake calculatorspecial function calculator with steps algorithm in javascriptcaculator html designwrite menu based program in python to create a four way calculatormaking a calculator in javascriptpython calculator projecthtml calculator interfacehow does calculator work javascriptcalculatorlhow to make calculator in javascripthow to create a calculator in python2 value calculator html codecalculator js codepython calculator procan you code on a calculatorvat calculatorhtml javascript calculation pagehow to code a calculator in pythonjavascript calculatorcalculater codehow to type into a javascript calculatorcalculator html and javascripthow to make a calculatorcalculator in js and htmlcalculator logic jscalculator with pythonpython code calculatorhow to see the code for an online calculatorhow to create a calculator in htmlhow to make html button do calculationhow to use point in html calculatorhtml web page calculatorcode to create a calculator in htmlcalculator using html and cssscientific calculator algorithm in javascriptcalc calculatorsimple calculator using javascriptmaking a calculator using javascriptsimple calculator htmlcalculator in html css and javascriptbuild a calculator in python formy calculator codehtml webpage calculatorhow to code a calculator in small calculator jsjavascript notes to make a calculatorhow to do calculator in jsberoas calculatorpython calculator code pdfcreate calculator in htmlhow to make your html calcultor give output make a calculator in pythoncalculadora pythonjavascript code for calculatorcalculator code html and javascriptcode for calculatorcalculator jscode calculatorhtml calculator examplecalculator html desing html code for calculatorcalculator using js and htmlmaking calculator in pythonwhen was calculator inventedcalculator in html and javascripthow to create calcultor in pythoncaluclator model in java scriptjavascript calculator with buttonsalgorithm for simple calculator in html and jshow to build a calculator using javascriptcalculator program in html and javascripthow to build a calculator how to create a calculator with pythoncalculator codinghow to make a javascript calculatorhow make a calculator in js step by stephtml calculator code 5ccode to make calculator in pythonmaking calculator in javascriptcalculator app using javascriptmanning 27s formula calculatorhow to make a calculator in python 8 digitscode ofr a calculatorcalculator code pythonjavascript simple calculator htmlbuilding a calculator in htmlcalculator app in javascriptcalculator web appcalculator codehow to make a calculator in html with javascriptscript for calculator with html and javascriptcode caculatorcalculator in javascript codecalculator using html and jsprogramming a calculatorwhat is the code for a calculatora code of calculatorcalculator using javascriptbuilding calculator javascriptpython calculator examplepython basic calculation between two numbershow to create a calculator in javascriptcomplication pyhton calculatorcalculator on pythonhow to make a calculator pythonpython program for calculatorbasic calculator in python calculator onlinehtml calculator codecalculator with jscalculator using html css and javascriptcalculator javascript codemakeing calculation in htmlhow to code a calculator in htmlcalculator app in python basic calculator program in pythoncreate calculator using 4 functionshow to build a simple calculator using javascriptcalculator 27calculator logic in javascriptcalculator with html css and javascript calutator htmlcreate and test an html document that has a basic calculator getting calculator display to work in javacsriptcalculator pythonpython calculator codehow to code calculatorcode an interactive calculator online with htmlhow to build a calculator with javascriptrealtivebearing python calculatorcalculator onlinecreate a calculator in javascriptwritten in standard form calculatororthocenter calculator with stepscalculator 5ckundi calculatorcalculator js htmlcalculato in javascriptpython on calculatorcalculator module in pythonhtml how to make calculatorcalculator html jscalculator in javascripthtml calculator design 3d calculatorcalculator 25simple calculator html codehow to create a calculator using javascript 25 calculatorhow to build an html calculatorjs calculator codedata calculator javascriptjavascrip t calcultor codeis calculate a function in pythoncalculator in javascript htmlmake a calculator using javascriptdevelop a menu driven python program to design a simple calculator for arthematic and relational operatorsimple calculator in pythoncalculator with javascript htmlpython simple calculatorcode for a calculatorcan u use a calculator on the ukmtjavascript calculuatora calculator code with pythonsimple calculator in html html5 make calculatorcalculator html input apicode on calculatorcalculator in html 27javascript calculator logiccalculator html with text develop a menu driven python program to design a simple calculator 25 calculator for pythonmake a calculator in javascriptrpn calculatorhow to make a calcultor web app python ccalculetorpython simple calculator programpython calaculatorm 2cake a calculator in jscalcu 3bator in javascriptdisplaying what we typed while making calculator in htmlcalculator html cssbuild a calculator in codehow to create a calculator in javasciptcode for calculator in pythonsimple html calculatorwebsite calculator htmlhtml css calculatorcalculator using javascript and htmlcalculator for website codecalculator in html jshow to build a calculator in jshow to make a calculator in pythoncode for making calculator in htmlwant to code a calculator with different values build a calculator with codecalculator online calculator codehow to create a calculator htmlcalculator source code in pythonhtml simple calculatorhow to code a simple calculator in pythoncalculatorjs event calculatorcode write calculater screencalculator code in javascriptcalculation method pythonsimple calculator pythonhow to code a calculatorcreate multiple calculator using javascriptscript for calculatorjavascript calculator codepython calculator code copy and pastehow to make a calculator in htmlhow to make a calculator jsmaking a calculator with javascriptjs run a program 28like calculator 29calculator using pythonjs calculatorcalcuator codecalculate html codehow to make a claculator in pythonhtml calculatorcode for calculator in htmlhow to make a calculator with javascriptcalculator scriptpython calcultorcal calculatorpython create module calculatorhtml calculatorsexpand the function calculatorsimple calculator in javascript and htmlcalculator design html css codecalculator using html cssssimple operating calculator source code in websitepython calculatorcalculator code in htmlinteractive calculator using jscode for simple calculator in pythoncalculator program in pythoncalculator in jsis there any function to type 2b only one time in calculator in htmlhow to make a calculator in jshow to create calculator in pythoncalculator htmlpython calchow to make calculator in js source codehow to make a calculator in webbroswerhtml calculator javascriptjavascript calculator using tablecreate html calculatorhow to program a calculator in javascriptmake a calculator on python vs codepython print calccalculator ui htmlcalculator button javascriptmake a calculator jscalculator code