? Good morning everyone:
First off, thanks for all of your help!!!!
I am really having probs with Java. For my assignment,
Enter a number (i.e. 3); hit the Go for it button; and the following appears. Your JavaScript adds/totals all the numbers from 1 to 5 ( 1+2+3=6). Beside the total is a graph of stars. The number of stars equals the total. You must use For loops to solve this problem. The final screen must read:
Number Total Graph
1 1 *
2 3
Here is the code:
<html><head>
<script language=”javascript”>
function loops()
{
var answer = 0, day, number;
number = parseInt(document.double.inputnumber.value);
}
</script>
<title>Lab 3 Test 2</title>
</head>
<body>
<form name=”double”>
Total the number from 1 to <input name = “inputnumber” type = “text” size = “6”><br>
<input type = “button” value = “Total the numbers” onclick = “loops()”><br>
The display area<br> <textarea name=”display” rows=”10″ cols=”35″>Number Total Graph</textarea>
</form>
</body></html>