Help With assignment due tomorrow monring
Help With assignment due tomorrow monring
Help With assignment due tomorrow monring
Help With assignment due tomorrow monring
Help With assignment due tomorrow monring
Help With assignment due tomorrow monring Help With assignment due tomorrow monring Help With assignment due tomorrow monring Help With assignment due tomorrow monring Help With assignment due tomorrow monring Help With assignment due tomorrow monring Help With assignment due tomorrow monring Help With assignment due tomorrow monring
Help With assignment due tomorrow monring Help With assignment due tomorrow monring
Help With assignment due tomorrow monring
Go Back  Xtreme Visual Basic Talk > > > Help With assignment due tomorrow monring


Reply
 
Thread Tools Display Modes
  #1  
Old 12-16-2003, 03:27 PM
HelpDrew HelpDrew is offline
Newcomer
 
Join Date: Dec 2003
Posts: 1
Exclamation Help With assignment due tomorrow monring


I am trying to make a program that computes the sales average and than how much above or below the average is (deviation) the person is. The names and sales are in the sales.txt document. I think you have to use an array but im not sure how any help would be use full this is what I have to far....

Code:
Dim bonus, totalsales, devamount As Double Dim names, sales As String Dim deviation(4) As Double Dim sr As IO.StreamReader = IO.File.OpenText("A:\sales.txt") Dim i As Integer i += 1 Dim fmtstr As String = "{0,-4}{1,12}{2,12}" lstoutputabc.Items.Add("Running 6d") lstoutputabc.Items.Add(String.Format(fmtstr, "Name", "Sales", "Deviation")) For i = 1 To 4 names = sr.ReadLine sales = sr.ReadLine totalsales = totalsales + CDbl(sales) devamount = totalsales / 4 deviation = totalsales - CDbl(devamount) deviation(i - 1) = devamount With lstoutputabc.Items .Add(String.Format(fmtstr, Name, FormatCurrency(sales), FormatCurrency(deviation))) End With Next sr.Close() End Sub

Im sure for some people this is a dumb question but if you could show me what to do I would be very thank full

Last edited by OnErr0r; 12-16-2003 at 03:32 PM.
Reply With Quote
  #2  
Old 12-16-2003, 03:32 PM
Iceplug's Avatar
IceplugHelp With assignment due tomorrow monring Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default

Aren't you supposed to calculate the deviation after you've gotten all four elements to calculate the average?
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Video Rental Assignment thetominator General 3 03-27-2003 12:49 PM
Converting and Using Dlls jesus4u General 17 07-23-2002 01:53 PM
type mismatch in form load knoxitis General 32 04-26-2002 10:52 AM
data type mismatch in criteria expression knoxitis General 16 04-23-2002 09:15 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Help With assignment due tomorrow monring
Help With assignment due tomorrow monring
Help With assignment due tomorrow monring Help With assignment due tomorrow monring
Help With assignment due tomorrow monring
Help With assignment due tomorrow monring
Help With assignment due tomorrow monring Help With assignment due tomorrow monring Help With assignment due tomorrow monring Help With assignment due tomorrow monring Help With assignment due tomorrow monring Help With assignment due tomorrow monring Help With assignment due tomorrow monring
Help With assignment due tomorrow monring
Help With assignment due tomorrow monring
 
Help With assignment due tomorrow monring
Help With assignment due tomorrow monring
 
-->