/    Sign up×
Community /Pin to ProfileBookmark

Java assignment HELP ME PLZ!!!

? 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>

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@AdyaauthorNov 22.2005 — Number 1, 2, 3 should be under "numbers", totals 1,3, 6 under "total" and stars *, ***,****** under "graph"
Copy linkTweet thisAlerts:
@KorNov 22.2005 — 
Good morning everyone:
[/quote]

For some of us is evening... ?

I am really having probs with Java.
[/quote]

You have deep probs with programming, generally speaking. [B]Java[/B] is [COLOR=Red][B]not[/B][/COLOR] [B]Javascript[/B]

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).... blah, blah...
[/quote]

This is a typical homework to do, or we don't do here someone else's homework. We are ready to help you if you have tried first to solve the problem somehow.

So: what have you done so far?
×

Success!

Help @Adya spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...