473,396 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Need Help With My Program

14
I AM TRYING FIGURE OUT A PROGRAM THAT COUNT THE NUMBER OF PEOPLE WHO GET OFF A TRAIN EACH TIME IT STOPS AT A SPECIFIC LOCATION
THIS IS MY CODE:
<html><head><title>Javascript</title></head>
<body>
<h1>Javascript example 1</h1>
<script language="JavaScript">


var count = 0;
var max = 0;
var min = 0;
var total = 0;
var avg = 0;
var passengers = 0;
var continue = true;

continue == confirm("Do you want to play?");

if(continue==true)
{
alert("lets play");
}
else
}
alert("see ya, peace out!");
}

while(continue==true)
{
passengers = parseInt(prompt("how many people got off the train?"));
count++;
if(count == 1)
{
max = passengers;
min = passengers;
}
if(max < passengers)
{
max = passengers;
}
if(min > passengers)
{
min = card;
}
total = total + passengers;
continue=confirm("play again?");
}
if(continue == true)
{
alert(“get continue”);
}
else
{
total = total / avg;
}
document.write(max, min, total, avg, count);

</script>
<p>Regular page content</p>

</body>
</html>
Dec 7 '06 #1
2 1078
steven
143 100+
I AM TRYING FIGURE OUT A PROGRAM THAT COUNT THE NUMBER OF PEOPLE WHO GET OFF A TRAIN EACH TIME IT STOPS AT A SPECIFIC LOCATION
Okay, and?

You haven't told us what your problem is. Also note that we're not here to complete your homework assignments for you, so, after you actually tell us what the problem is, go ahead and tell us what you've done to try and solve the problem.
Dec 7 '06 #2
hjc
14
sorry to bother you-i didn't want anything done other than to know if the code is set up right. I have a flow chart and have the problem figured out, that is why i didn't include the entire question. like i said just looking to have someone look at my code
Dec 7 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: aj902 | last post by:
Hello , I am trying to create a program where all detail, http://www.albany.edu/~csi333/projects.htm
4
by: robinsand | last post by:
My apologies to those of you who are more advanced Visual C++ .NET programmers, but I am working on a project for an MBA course that is condensed into an eight-week schedule, and I need help...
4
by: naknak4 | last post by:
Introduction This assignment requires you to develop solutions to the given problem using several different approaches (which actually involves using three different STL containers). You will...
6
by: naknak | last post by:
Introduction This assignment requires you to develop solutions to the given problem using several different approaches (which actually involves using three different STL containers). You will...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.