Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var wyrazenie = ""
- var nowe = true;
- function wprowadz (wartosc)
- {
- var wyswietlacz = document.kalkulator.wyswietlacz;
- if (nowe){
- nowe = !nowe;
- wyswietlacz.value = "";
- }
- wyswietlacz.value += wartosc;
- wyrazenie += wartosc;
- }
- function dzialanie (wartosc)
- {
- var wyswietlacz = document.kalkulator.wyswietlacz;
- wyswietlacz.value = "";
- wyrazenie += wartosc;
- }
- function oblicz ()
- {
- var wyswietlacz = document.kalkulator.wyswietlacz;
- if (wyrazenie != "");{
- wyswietlacz.value = eval (wyrazenie);
- wyrazenie = wyswietlacz.value;
- nowe = true;
- }
- }
- function zeruj()
- {
- wyrazenie = "";
- document.kalkulator.wyswietlacz.value = "";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement