Problem with if statement

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<script type="text/javascript">

function ro_div_b(form) {
form.ans.value = c

function alfa(form) {
	form.ans3.value = a;error

var a = 10;
var error = "error";
if (c<5 && c>3)
	else {


  <FORM name="formx">
  <table width="93" border="1">
    <td width="30">&#961;=</td>
    <td width="154"><input type=text size=4 value="" name="ro"></td>
    <td><input type=text size=4 value="" name="b"></td>
    <td><input type "number" value=0 name="ans" size=9></td>
    <td colspan="2"><div align="center">
      <input type="button" value=" ok " onClick="ro_div_b(this.form);alfa(this.form)">
    <td colspan="2">
      <div align="center">
      <input type="type" "number" value="" name="ans3" size="9" />



problem is in function alfa…i am aware that there is no way this is going to work, but i need a solution

so if answer is between 3 and 5 it writes 10 and if it not it writes error

pls help

nice…it works…thanks!

function alfa(form) {
var c = parseFloat(form.ans.value);
form.ans3.value = (c<5 && c>3)? 10 : 'error';