Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,192 members, 7,818,633 topics. Date: Sunday, 05 May 2024 at 08:18 PM

HELP: Programmers In The House Please Help Out - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / HELP: Programmers In The House Please Help Out (1580 Views)

Please, I Need Help?.....programmers,help A Nairalander? / I Need Help Programmers In The House / No Programmers In Nairaland (2) (3) (4)

(1) (Reply) (Go Down)

HELP: Programmers In The House Please Help Out by fingard02k(m): 4:16am On Sep 12, 2014
please someone should help or guild me through on how to write a QBASIC program using IF THEN ELSE or IF THEN ELSE IF statement to write a GPA calculator of five courses which is english, biology, maths, physics, econs.


GRADE
A= 4.0
B= 3.5
C= 3.0
D= 2.5
P= 2.0
F= 0.0


CREDIT LOADS
english= 4
biology= 4
maths= 4
physics= 2
econs= 3


...The program should have an input where the student/person will be INPUTing A,B,C,D,P and F and the program will calculate and print out the output being GRADES/CREDIT LOADS
Re: HELP: Programmers In The House Please Help Out by romme2u: 5:47am On Sep 12, 2014
Always do your homework and dont solicit for help on trivial issues like this. You will never learn if you dont try. Studying and learning is not just to pass your exams but to build a better you, so that you could be useful to urself and the nation in years to come.

write the program and paste it here so that u can get help to make it better.

3 Likes

Re: HELP: Programmers In The House Please Help Out by fingard02k(m): 8:55am On Sep 12, 2014
romme2u: Always do your homework and dont solicit for help on trivial issues like this. You will never learn if you dont try. Studying and learning is not just to pass your exams but to build a better you, so that you could be useful to urself and the nation in years to come.

write the program and paste it here so that u can get help to make it better.
Thanks

The one i wrote didnt work. Syntax error was too much..just need some clue.
Its not an assignment or anything related to school buh something i wanna learn
Re: HELP: Programmers In The House Please Help Out by Javanian: 7:26pm On Sep 12, 2014
fingard02k:
Thanks

The one i wrote didnt work. Syntax error was too much..just need some clue.
Its not an assignment or anything related to school buh something i wanna learn

Paste the code here.
Re: HELP: Programmers In The House Please Help Out by fingard02k(m): 7:47pm On Sep 13, 2014
Javanian:

Paste the code here.

CLS

INPUT "Enter your english score"; eng$

INPUT "Enter your maths score"; math$

INPUT "Enter your biology score"; bio$

INPUT "Enter your physics score"; phy$

INPUT "Enter your economics score"; econ$

A= 4.0

B= 3.5

C= 3.0

D= 2.5

P= 2.0

F= 0.0

grade = A+B+C+D+P+F

english= 4

biology= 4

maths= 4

physics= 2

econs= 3

Loads =english+biology+maths+physics+econs

If eng$,math$,bio$,phy$,econ$ = A,B,C,D,P,F THEN GOTO 50

50 gpa = grade/loads

PRINT gpa

END
Re: HELP: Programmers In The House Please Help Out by fingard02k(m): 11:41pm On Sep 13, 2014
Javanian , lordZOUGA Fayimora, kodewrita you guys should please help me out with this.
Re: HELP: Programmers In The House Please Help Out by cyrusolu(m): 2:05pm On Sep 14, 2014
Xx

2 Likes

Re: HELP: Programmers In The House Please Help Out by fingard02k(m): 2:33pm On Sep 14, 2014
cyrusolu: CLS
DIM A, B, C, D, P, F AS DOUBLE
DIM total AS DOUBLE
DIM creng, crbio, crmat, crphy, creco AS DOUBLE
A = 4!
B = 3.5
C = 3!
D = 2.5
P = 2!
F = 0!

creng = 4!
crbio = 4!
crmat = 4!
crphy = 2!
creco = 3!
total = 17!

INPUT "Enter your grade in English: ", eng#
SELECT CASE eng#
CASE A
engtot# = creng * A
CASE B
engtot# = creng * B
CASE C
engtot# = creng * C
CASE D
engtot# = creng * D
CASE P
engtot# = creng * P
CASE F
engtot# = creng * F
CASE ELSE
PRINT "Invalid grade"
END SELECT
PRINT "Total for English: "; engtot#

INPUT "Enter your grade in Biology: ", bio#
SELECT CASE bio#
CASE A
biotot# = crbio * A
CASE B
biotot# = crbio * B
CASE C
biotot# = crbio * C
CASE D
biotot# = crbio * D
CASE P
biotot# = crbio * P
CASE F
biotot# = crbio * F
CASE ELSE
PRINT "Invalid grade"
END SELECT
PRINT "Total for Biology: "; biotot#

INPUT "Enter your grade in Maths: ", mat#
SELECT CASE mat#
CASE A
mattot# = crmat * A
CASE B
mattot# = crmat * B
CASE C
mattot# = crmat * C
CASE D
mattot# = crmat * D
CASE P
mattot# = crmat * P
CASE F
mattot# = crmat * F
CASE ELSE
PRINT "Invalid grade"
END SELECT
PRINT "Total for Maths: "; mattot#

INPUT "Enter your grade in Physics: ", phy#
SELECT CASE phy#
CASE A
phytot# = crphy * A
CASE B
phytot# = crphy * B
CASE C
phytot# = crphy * C
CASE D
phytot# = crphy * D
CASE P
phytot# = crphy * P
CASE F
phytot# = crphy * F
CASE ELSE
PRINT "Invalid grade"
END SELECT
PRINT "Total for Physics: "; phytot#

INPUT "Enter your grade in Economics: ", eco#
SELECT CASE eco#
CASE A
ecotot# = creco * A
CASE B
ecotot# = creco * B
CASE C
ecotot# = creco * C
CASE D
ecotot# = creco * D
CASE P
ecotot# = creco * P
CASE F
ecotot# = creco * F
CASE ELSE
PRINT "Invalid grade"
END SELECT
PRINT "Total for Economics: "; ecotot#

cum# = engtot# + biotot# + mattot# + phytot# + ecotot#

gpa# = cum# / total

PRINT "Your GPA := "; gpa#







########################################
RESULT
########################################

Enter your grade in English: 4
Total for English: 16
Enter your grade in Biology: 3.5
Total for Biology: 14
Enter your grade in Maths: 3
Total for Maths: 12
Enter your grade in Physics: 2.5
Total for Physics: 5
Enter your grade in Economics: 4
Total for Economics: 12
Your GPA := 3.470588235294118













Press any key to continue

Tanx alot bro but the things is that i'm only looking/asking for a way to write it with IF THEN ELSE or IF THEN ELSEIF only

lemme try it with dis ur steps
Re: HELP: Programmers In The House Please Help Out by cyrusolu(m): 5:37pm On Sep 14, 2014
CLS
DIM A, B, C, D, P, F AS INTEGER
DIM total AS DOUBLE
DIM creng, crbio, crmat, crphy, creco AS DOUBLE
A = 4
B = 3.5
C = 3
D = 2.5
P = 2
F = 0

creng = 4!
crbio = 4!
crmat = 4!
crphy = 2!
creco = 3!
total = 17!

INPUT "Enter your grade in English: ", eng$

IF eng$ = "A" THEN
engtot# = creng * A
ELSEIF eng$ = "B" THEN
engtot# = creng * B
ELSEIF eng$ = "C" THEN
engtot# = creng * C
ELSEIF eng$ = "grin" THEN
engtot# = creng * D
ELSEIF eng$ = "P" THEN
engtot# = creng * P
ELSEIF eng$ = "F" THEN
engtot# = creng * F
ELSE
PRINT "Invalid grade"
END IF
PRINT "Total for English: "; engtot#


INPUT "Enter your grade in Biology: ", bio$

IF bio$ = "A" THEN
biotot# = crbio * A
ELSEIF bio$ = "B" THEN
biotot# = crbio * B
ELSEIF bio$ = "C" THEN
biotot# = crbio * C
ELSEIF bio$ = "grin" THEN
biotot# = crbio * D
ELSEIF bio$ = "P" THEN
biotot# = crbio * P
ELSEIF bio$ = "F" THEN
biotot# = crbio * F
ELSE
PRINT "Invalid grade"
END IF
PRINT "Total for Biology: "; biotot#


INPUT "Enter your grade in Maths: ", mat$

IF mat$ = "A" THEN
mattot# = crmat * A
ELSEIF mat$ = "B" THEN
mattot# = crmat * B
ELSEIF mat$ = "C" THEN
mattot# = crmat * C
ELSEIF mat$ = "grin" THEN
mattot# = crmat * D
ELSEIF mat$ = "P" THEN
mattot# = crmat * P
ELSEIF mat$ = "F" THEN
mattot# = crmat * F
ELSE
PRINT "Invalid grade"
END IF
PRINT "Total for Maths: "; mattot#


INPUT "Enter your grade in Physics: ", phy$

IF phy$ = "A" THEN
phytot# = crphy * A
ELSEIF phy$ = "B" THEN
phytot# = crphy * B
ELSEIF phy$ = "C" THEN
phytot# = crphy * C
ELSEIF phy$ = "grin" THEN
phytot# = crphy * D
ELSEIF phy$ = "P" THEN
phytot# = crphy * P
ELSEIF phy$ = "F" THEN
phytot# = crphy * F
ELSE
PRINT "Invalid grade"
END IF
PRINT "Total for Physics: "; phytot#



INPUT "Enter your grade in Economics ", eco$

IF eco$ = "A" THEN
ecotot# = creco * A
ELSEIF eco$ = "B" THEN
ecotot# = creco * B
ELSEIF eco$ = "C" THEN
ecotot# = creco * C
ELSEIF eco$ = "grin" THEN
ecotot# = creco * D
ELSEIF eco$ = "P" THEN
ecotot# = creco * P
ELSEIF eco$ = "F" THEN
ecotot# = creco * F
ELSE
PRINT "Invalid grade"
END IF
PRINT "Total for Economics: "; ecotot#

cum# = engtot# + biotot# + mattot# + phytot# + ecotot#

gpa# = cum# / total
PRINT "Your cumulative point is:"; cum#
PRINT "Your total Course Load is:"; total
PRINT "Your GPA is: "; gpa#
END


#########################################
RESULT
#########################################


Press any key to continueEnter your grade in English: A
Total for English: 16
Enter your grade in Biology: B
Total for Biology: 14
Enter your grade in Maths: C
Total for Maths: 12
Enter your grade in Physics: P
Total for Physics: 4
Enter your grade in Economics D
Total for Economics: 7.5
Your cumulative point is: 53.5
Your total Course Load is: 17
Your GPA is: 3.147058823529412











Press any key to continue

1 Like

Re: HELP: Programmers In The House Please Help Out by fingard02k(m): 2:45pm On Sep 18, 2014
cyrusolu: .

Thanks a lot bro... I will test it when im done writting the one i'm writting now

(1) (Reply)

Must I Learn Everything On Java As An Android Developer? / Which Is The Best Serve Side Scriptn Language Php Vs Ruby Vs Python Vs Perl / Coder's Hub - Connecting Like Minded Developers

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 36
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.