borderAndreaVB free resources for Visual Basic developersborder

AndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincani

AndreaVB Home | News Home | Forum Home | Downloads | Register | Search | PM | Profile

Previous Topic (A folder making prog)Next Topic (VB IDE : Add components : permission denied) New Topic Post Reply
AndreaVB OnLine : VB General : COMPUTAION of GRADES
Poster Resource
c22kie
Level: Trainee

Registered: 18-01-2006
Posts: 1
icon COMPUTAION of GRADES

im really a newbie in Visual Basic and i am asked to produce calculations of grades a user may input..

here are the formulas..
Qave=((Q1+Q2)/2*0.2
Att=Attendance * 0.05
Exam=Exam * 0.75
Lecgrade=Qave+Att+Exam
MPave=((MP1+MP2)/2*0.5
LabExam=Lab*5
LabGrade=(MPave+LabExam)
FinalGrade=((LecGrade*0.5)+(LabGrade*0.5))

honestly, i find it really difficult bec im not so much familiar of the commands in VB such as Dim etc.. so i hope u could help me..     tnx in advance

18-01-2006 at 02:56 AM
View Profile Send Email to User Show All Posts Visit Homepage | Add Comment
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: COMPUTAION of GRADES

What is it that you're needing then?

If you're wondering about the types for the variables... if you want it automatically rounded (i.e. don't care about the decimal) they can be integer, otheriwse single

____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

18-01-2006 at 05:48 AM
View Profile Send Email to User Show All Posts Visit Homepage | Add Comment
xtramac
Level: Professor


Registered: 28-08-2005
Posts: 89
icon Re: COMPUTAION of GRADES

hello,

i think i can relate to your question for some reasons. for grades you need to do declare all you variables as single since you will of course be considering the fractional part of the grades/scores.

to declare it u may do this:

[vbcode]
dim Qave as Single

'assuming that you have also declared q1 & q2
Qave = ((Q1 + Q2))/2 * .2

'you can do the rest

hope this helps..


  

andrew

20-01-2006 at 04:44 AM
View Profile Send Email to User Show All Posts | Add Comment
AndreaVB OnLine : VB General : COMPUTAION of GRADES
Previous Topic (A folder making prog)Next Topic (VB IDE : Add components : permission denied)New Topic Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder