Answers for "sum that is multiple of 4"

1

sum of all multiples of 3 and 5 below 100

c = list(range(1,100))

total = 0

for i in (c):
    if i % 3 == 0 or i % 5 == 0:
      total += i
print (total)
Posted by: Guest on September-11-2021
0

Sum of two numbers

<html>
<head>
    <script type="text/javascript">
        function sum() {
            var num1 = Number(document.getElementById("field").value);
            var num2 = Number(document.getElementById("field2").value);
            var sum= num1+num2;
            alert("The sum is" +" "+ sum);
        };
    </script>
</head>
 
<body>
    <h2>Adding two Number</h2>
    <form>
 
        <input type="text" placeholder="Enter A Number" id="field"><br><br>
        <input type="text" placeholder="Enter A Number" id="field2"><br><br>
        <input type="button" value="ADD" onclick="sum()" />
    </form>
</body>
</html>
Posted by: Guest on September-11-2021

Code answers related to "sum that is multiple of 4"

Browse Popular Code Answers by Language