- Also - looks as though a score of 60 qualifies as a "D" - in the

range 60-69 ALSO qualifies as an "F" - less than 61.

maybe the "F" grade is a score less than 60?

--- In libertybasic@yahoogroups.com, "bill" <majorwar@y...> wrote:

>

> Hi,

> I am a college student and I am new to Leberty Basic. I am

writing

> a program that is supposed to find the averages of three scores for

> 30 different students and print out a letter grade. The problem I

am

> having is that I am not sure how to put in a number range, IE. a

> letter grade of "B" is a number between 80 and 90. Any suggestions?

>

> REM Bill E

> rem Project Delta

> rem OCT 26 2005

> rem this program will take 3 grades per student,average them, and

> then provide an output with the name and letter grade for each

student

> rem VAR studentname$= The array holding the student names

> rem VAR studentscore= The array holding the students average

> rem VAR student$= The students namerem VAR c=counter

> rem VAR average = average of three scores

> rem VAR x=Variable number on counter

> rem clear screen

> cls

> rem Making the arrays

> dim studentname$(30)

> dim studentscore(30)

> dim grade$(30)

> rem input student names

> input "Enter student name:" ; student$

> while student$ <> ""

> rem counter to tell us how many students we have processed

> let c = c+1

> cls

> input "Enter the first score:" ; score1

> cls

> input "Enter the second score:"; score2

> cls

> input "Enter the third score:"; score3

> let studentname$(c) = student$

> let average =(score1+score2+score3) /3

> let studentscore(c) =average

> cls

> input "Enter the next students name, or hit enter to

continue:";

> student$

> wend

> cls

> for x = 1 to c

> GOSUB [grades]

> print " BILLS GRADE

> BOOK "

> print "Student",

> print "Grade"

> print studentname$(x), grade$(x)

> print " BILLS GRADE

> BOOK "

> print "Student",

> print "Grade"

> print studentname$(x), grade$(x)

> next x

> end

>

> [grades]

> if studentscore(x) <61 then

> grade$(x) = "F"

> Else

> if studentscore(x) = 60 69 then

> grade$(x) = "D"

> END IF

> END IF

> if studentscore(x) = 70 79 then

> grade$(x) = "C"

> Else

> if studentscore(x) = 80 89 then

> grade$(x) = "B"

> END IF

> END IF

> if studentscore(x) >90 then

> grade$(x) = "A"

> Else

>

> END IF

> Return

> - I actually figured this one out. In between each of

those numbers I put >= and it fixed my problem.

Thanks!!

--- Joe <jj.jackson@...> wrote:

> Also - looks as though a score of 60 qualifies as a

__________________________________

> "D" - in the

> range 60-69 ALSO qualifies as an "F" - less than

> 61.

>

> maybe the "F" grade is a score less than 60?

>

>

>

>

> --- In libertybasic@yahoogroups.com, "bill"

> <majorwar@y...> wrote:

> >

> > Hi,

> > I am a college student and I am new to Leberty

> Basic. I am

> writing

> > a program that is supposed to find the averages of

> three scores for

> > 30 different students and print out a letter

> grade. The problem I

> am

> > having is that I am not sure how to put in a

> number range, IE. a

> > letter grade of "B" is a number between 80 and 90.

> Any suggestions?

> >

> > REM Bill E

> > rem Project Delta

> > rem OCT 26 2005

> > rem this program will take 3 grades per

> student,average them, and

> > then provide an output with the name and letter

> grade for each

> student

> > rem VAR studentname$= The array holding the

> student names

> > rem VAR studentscore= The array holding the

> students average

> > rem VAR student$= The students namerem VAR

> c=counter

> > rem VAR average = average of three scores

> > rem VAR x=Variable number on counter

> > rem clear screen

> > cls

> > rem Making the arrays

> > dim studentname$(30)

> > dim studentscore(30)

> > dim grade$(30)

> > rem input student names

> > input "Enter student name:" ; student$

> > while student$ <> ""

> > rem counter to tell us how many students we

> have processed

> > let c = c+1

> > cls

> > input "Enter the first score:" ; score1

> > cls

> > input "Enter the second score:"; score2

> > cls

> > input "Enter the third score:"; score3

> > let studentname$(c) = student$

> > let average =(score1+score2+score3) /3

> > let studentscore(c) =average

> > cls

> > input "Enter the next students name, or hit

> enter to

> continue:";

> > student$

> > wend

> > cls

> > for x = 1 to c

> > GOSUB [grades]

> > print " BILLS GRADE

> > BOOK "

> > print "Student",

> > print "Grade"

> > print studentname$(x), grade$(x)

> > print " BILLS GRADE

> > BOOK "

> > print "Student",

> > print "Grade"

> > print studentname$(x), grade$(x)

> > next x

> > end

> >

> > [grades]

> > if studentscore(x) <61 then

> > grade$(x) = "F"

> > Else

> > if studentscore(x) = 60 69 then

> > grade$(x) = "D"

> > END IF

> > END IF

> > if studentscore(x) = 70 79 then

> > grade$(x) = "C"

> > Else

> > if studentscore(x) = 80 89 then

> > grade$(x) = "B"

> > END IF

> > END IF

> > if studentscore(x) >90 then

> > grade$(x) = "A"

> > Else

> >

> > END IF

> > Return

> >

>

>

>

>

>

>

Yahoo! Mail - PC Magazine Editors' Choice 2005

http://mail.yahoo.com - I actually solved the problem by making it ">=" Thank

you!

--- pendl2megabit <pendl2megabit@...> wrote:

> Bill,

___________________________________________________________

> here is one solution for your problem.

>

> '---code start

> ' Bill E

> ' Project Delta

> ' OCT 26 2005

> ' this program will take 3 grades per

> student,average them, and

> ' then provide an output with the name and letter

> grade for each student

> ' VAR studentname$= The array holding the student

> names

> ' VAR studentscore= The array holding the students

> average

> ' VAR student$= The students name' VAR c=counter

> ' VAR average = average of three scores

> ' VAR x=Variable number on counter

> ' Making the arrays

> dim studentname$(30)

> dim studentscore(30)

> dim grade$(30)

> ' clear screen

> cls

> ' input student names

> input "Enter student name:" ; student$

> while student$ <> ""

> ' counter to tell us how many students we have

> processed

> let c = c+1

> print

> input "Enter the first score:" ; score1

> print

> input "Enter the second score:"; score2

> print

> input "Enter the third score:"; score3

> ' calculate the average

> let studentname$(c) = student$

> let average =(score1+score2+score3) /3

> let studentscore(c) =average

> print

> print "Enter the next students name"

> input "or hit enter to continue:"; student$

> cls

> wend

> print " BILLS GRADE

> BOOK"

> for x = 1 to c

> GOSUB [grades]

> print

> print "Student", "Grade"

> print studentname$(x), grade$(x)

> next x

> end

>

> [grades]

> grade$(x) = "A"

> if studentscore(x) < 90 then grade$(x) = "B"

> if studentscore(x) < 80 then grade$(x) = "C"

> if studentscore(x) < 70 then grade$(x) = "D"

> if studentscore(x) < 60 then grade$(x) = "F"

> Return

> '---code end

>

> ---

> Stefan Pendl

>

>

> > -----Ursprüngliche Nachricht-----

> > Von: libertybasic@yahoogroups.com

> >

> > Hi,

> > I am a college student and I am new to Leberty

> Basic. I am writing

> > a program that is supposed to find the averages of

> three scores for

> > 30 different students and print out a letter

> grade. The problem I am

> > having is that I am not sure how to put in a

> number range, IE. a

> > letter grade of "B" is a number between 80 and 90.

> Any suggestions?

> >

> ---snip

>

>

>

>

>

>

>

>

__________________________________

> Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher

> kostenlos - Hier anmelden: http://mail.yahoo.de

>

Yahoo! FareChase: Search multiple travel sites in one click.

http://farechase.yahoo.com