i cant seem to figure out how to get the computer to know even / odd numbers using it for a prime factors. not looking for someone to do it for me just need a nudge in the right direction
create code that asks the user to supply an integer greater than 1 and then display all the prime numbers that multiply together to get the user’s number. If a number is a prime, its only factors are itself and one.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>OddsEvens</title>
</head>
<body>
<script>
var integer;
var factor;
var fn;
integer= 1;
factor= prompt ("plz instert a number greater then 1");
fn= 2;
if (factor <= integer) {
alert ("invalid number");
} if (fn / integer) == 0 ){
alert ("even");
}
</script>
</body>
</html>