0

How to write a program in html to find the smaller number between 2 numbers

Smaller number

22nd Feb 2021, 1:36 PM
Sneha Singh
Sneha Singh - avatar
11 ответов
+ 5
That is some basic math like if a<b: a , and html is a markup language , maybe you are talking about writing in js.
22nd Feb 2021, 1:42 PM
Abhay
Abhay - avatar
+ 2
technically not in html, but with js wich is scripting language designed for html ^^ first you need to input two numbers (with html <input> or with js input function) second, you need to cast you input strings to numbers third you need to compare the two numbers, and output the smaller one (if (a < b) a else b), either in the html document or trough alert or console.log functions...
22nd Feb 2021, 1:51 PM
visph
visph - avatar
+ 2
maybe I will post an example code later... however, you should learn html (only course started, but still 0%), then start css and finally start js, if you want to be able to do it yourself ^^
22nd Feb 2021, 2:10 PM
visph
visph - avatar
+ 1
yes, I can... but you must try from yourself first ;P
22nd Feb 2021, 2:06 PM
visph
visph - avatar
0
Ok
22nd Feb 2021, 1:43 PM
Sneha Singh
Sneha Singh - avatar
0
We can't write a program in html about finding the smaller number
22nd Feb 2021, 1:43 PM
Sneha Singh
Sneha Singh - avatar
0
Can you please write the program and send
22nd Feb 2021, 2:05 PM
Sneha Singh
Sneha Singh - avatar
0
I don't know how to write that is why asking
22nd Feb 2021, 2:06 PM
Sneha Singh
Sneha Singh - avatar
0
Ok
22nd Feb 2021, 2:10 PM
Sneha Singh
Sneha Singh - avatar
0
Thanks a lot
22nd Feb 2021, 2:25 PM
Sneha Singh
Sneha Singh - avatar