alnada266 Posted April 10, 2006 Share Posted April 10, 2006 If I wonder If I can ask you solution of this program I beginer learning in javascript please could you help me to write this programto allow you to enter the quarterly income of your organization for the entire year.find average yearly income and the total yearly income.from the total yearly income calculate the tax at %15 of the total income.use control strucures the requirement :income for qaurter1:150000income for qaurter2:250000income for qaurter3:175000income for qaurter4:125000total income:700000average income:175000tax:105000net income:595000please I need your help, I'm feeling sick! Thanks for help me Link to comment Share on other sites More sharing options...
Webworldx Posted April 10, 2006 Share Posted April 10, 2006 This sounds like you've been given it as a project to do, do you have anything to start it with (we're not just going to write the whole thing for you). A form with all the information in, and where you've got to? Link to comment Share on other sites More sharing options...
alnada266 Posted April 10, 2006 Author Share Posted April 10, 2006 <html><head><title><title><script language="javascript">var income;var netincome;var incometax;var average;total income; income=(); netincome=(); incometa=(); average=total income=document.write("Income Tax = " + IncomeTax + "<BR>");document.write("Net Income = " + NetIncome + "<BR>");</script></head></html>please help me I wonder If you complete this program I want to learn my professor don't want help me I need this program first of all to learn PLEASE I don't know How calculate this problem It is hard Link to comment Share on other sites More sharing options...
Webworldx Posted April 11, 2006 Share Posted April 11, 2006 Well, you know what the income for each quarter is, so:var income = new Array( 150000 , 250000 , 175000 , 125000 );for each quarter, as above. So income[0] is 150000 , income[1] is 250000, income[2] is 175000 and income[3] is 125000.So:var totalIncome = 0;for(i=0;i<income.length;i++){ totalIncome += income}will give you the total.var tax = (totalIncome / 100) * 15will give you the taxvar average = totalIncome / 4is the average. etc. I'll leave you work out net, and write the end result into a good looking document. Link to comment Share on other sites More sharing options...
alnada266 Posted April 11, 2006 Author Share Posted April 11, 2006 Thanks very much my friend Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now