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)
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)
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>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us