|
|
Регистрация Восстановить пароль |
Регистрация | Задать вопрос |
Заплачу за решение |
Новые сообщения |
Сообщения за день |
Расширенный поиск |
Правила |
Всё прочитано |
|
Опции темы | Поиск в этой теме |
08.12.2015, 17:08 | #1 |
Регистрация: 08.12.2015
Сообщений: 4
|
Предусмотреть соответствующее сообщение при делении на ноль.
Код HTML:
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <title>Калькулятор</title> <link rel="stylesheet" href="style.css" /> </head> <body> <div id="calculator"> <form name="calculator"> <table border="1"> <tr> <td colspan="5"><input id="disp" type="text" class="area" /></td> </tr> <tr> <td><input id="seven" type="button" name="button" value="7" /></td> <td><input id="eight" type="button" name="button" value="8" /></td> <td><input id="nine" type="button" name="button" value="9" /></td> <td><input id="divide" type="button" name="button" value="/" /></td> <td><input id="btnclear" type="button" name="button" value="C" /></td> </tr> <tr> <td><input id="four" type="button" name="button" value="4" /></td> <td><input id="five" type="button" name="button" value="5" /></td> <td><input id="six" type="button" name="button" value="6" /></td> <td><input id="multiply" type="button" name="button" value="*" /></td> <td><input id="btnneg" type="button" name="button" value="±" /></td> </tr> <tr> <td><input id="one" type="button" name="button" value="1" /></td> <td><input id="two" type="button" name="button" value="2" /></td> <td><input id="three" type="button" name="button" value="3" /></td> <td><input id="substract" type="button" name="button" value="-" /></td> <td rowspan="2"><input id="btnequals" class="anyway" type="button" name="button" value="=" /></td> </tr> <tr> <td colspan="2"><input id="zero" class="zero" type="button" name="button" value="0" /></td> <td><input id="decimal" type="button" name="button" value="." /></td> <td><input id="add" type="button" name="button" value="+" /></td> </tr> </table> </form> </div> <script src="JS.js"></script> </body> </html> Код:
|
08.12.2015, 17:10 | #2 |
Регистрация: 08.12.2015
Сообщений: 4
|
Что то типа - "Делить на 0 не надо". Просто что бы выводилось на экран при делении на 0. И если возможно, что бы точку ставить можно было только один раз
|
09.12.2015, 09:30 | #3 |
Форумчанин
Регистрация: 27.05.2009
Сообщений: 192
|
Код:
Последний раз редактировалось Kazik; 09.12.2015 в 09:52. |
Похожие темы | ||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
подскажите пожалуйста как остановить цикл сообщением об ошибке при делении на ноль и вернуться на начало программы | Nata Golden rose | Общие вопросы C/C++ | 1 | 22.05.2014 08:02 |
При делении на 0 пишет -1.#INF | Tatyana64 | Помощь студентам | 1 | 04.11.2012 12:25 |
Ошибка при делении на 0 | roxy7 | Общие вопросы Delphi | 3 | 25.05.2012 10:54 |
ошибка при делении на ноль.. | vityanya | Общие вопросы Delphi | 2 | 13.01.2011 05:29 |
Переполнение при делении | JeyKip | Assembler - Ассемблер (FASM, MASM, WASM, NASM, GoASM, Gas, RosAsm, HLA) и не рекомендуем TASM | 1 | 20.03.2010 14:04 |