Qbasic Program help PLS!!!!!!!
Qbasic Program help PLS!!!!!!!
Hey! Im having an awful time with 4 Qbasic programs. If there is someone out there that could help a lady Pls reply or send me an email and we can go into futher details about them... GRR Im beginning not to like if then statements.
Life is sweet.
~QT-Pi~
Life is sweet.
~QT-Pi~
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
Thx, didnt know that......well here is the complete code. It is as follows....
'******************************
'* Main Program *
'******************************
GOSUB A100.Initialization
GOSUB B100.Process.File
GOSUB C100.Wrap.Up
END
'******************************
'* Initialization *
'******************************
A100.Initialization:
Emp.Count = 0
Total.Gross = 0
CLS
GOSUB A200.Initialize.Report
GOSUB A210.Print.Heading
RETURN
'*******************************
'* Initialize Report *
'*******************************
A200.Initialize.Report:
H1$ = "Employee Salary Report"
H2$ = "Employee Employee"
H3$ = "Number Salary"
H4$ = "-------- --------"
D1$ = " \ \ ##,###.##"
T1$ = "Number of Employees ===> ###"
T2$ = "Average Salary ========> $$,###.##"
T3$ = "End of Employee Salary Report"
RETURN
'********************************
'* Print Heading *
'********************************
A210.Print.Heading:
PRINT H1$
PRINT
PRINT H2$
PRINT H3$
PRINT
RETURN
'********************************
'* Process File *
'********************************
B100.Process.File:
READ Emp.Number$, Emp.Salary
DO WHILE Emp.Number$ <> "EOF"
GOSUB B200.Compute.Gross
PRINT USING D1$; Emp.Number$; Emp.Salary
READ Emp.Number$, Emp.Salary
LOOP
RETURN
'*********************************
'* Compute Gross *
'*********************************
B200.Compute.Gross:
Emp.Count = Emp.Count + 1
Emp.Gross = Emp.Salary + Emp.Salary + Emp.Salary + Emp.Salary + Emp.Salary
RETURN
'********************************
'* Wrap Up *
'********************************
C100.Wrap.Up:
Average.Gross = Emp.Gross / Emp.Count
PRINT
PRINT USING T1$; Emp.Count
PRINT USING T2$; Average.Gross
PRINT
PRINT T4$
RETURN
'*******Data Follows*************
DATA 123, 16000
DATA 148, 18126
DATA 184, 14800
DATA 196, 17400
DATA 201, 18950
DATA EOF, 0
'*******End of Program***********
Life is Sweet!
~QT-Pi~
'******************************
'* Main Program *
'******************************
GOSUB A100.Initialization
GOSUB B100.Process.File
GOSUB C100.Wrap.Up
END
'******************************
'* Initialization *
'******************************
A100.Initialization:
Emp.Count = 0
Total.Gross = 0
CLS
GOSUB A200.Initialize.Report
GOSUB A210.Print.Heading
RETURN
'*******************************
'* Initialize Report *
'*******************************
A200.Initialize.Report:
H1$ = "Employee Salary Report"
H2$ = "Employee Employee"
H3$ = "Number Salary"
H4$ = "-------- --------"
D1$ = " \ \ ##,###.##"
T1$ = "Number of Employees ===> ###"
T2$ = "Average Salary ========> $$,###.##"
T3$ = "End of Employee Salary Report"
RETURN
'********************************
'* Print Heading *
'********************************
A210.Print.Heading:
PRINT H1$
PRINT H2$
PRINT H3$
RETURN
'********************************
'* Process File *
'********************************
B100.Process.File:
READ Emp.Number$, Emp.Salary
DO WHILE Emp.Number$ <> "EOF"
GOSUB B200.Compute.Gross
PRINT USING D1$; Emp.Number$; Emp.Salary
READ Emp.Number$, Emp.Salary
LOOP
RETURN
'*********************************
'* Compute Gross *
'*********************************
B200.Compute.Gross:
Emp.Count = Emp.Count + 1
Emp.Gross = Emp.Salary + Emp.Salary + Emp.Salary + Emp.Salary + Emp.Salary
RETURN
'********************************
'* Wrap Up *
'********************************
C100.Wrap.Up:
Average.Gross = Emp.Gross / Emp.Count
PRINT USING T1$; Emp.Count
PRINT USING T2$; Average.Gross
PRINT T4$
RETURN
'*******Data Follows*************
DATA 123, 16000
DATA 148, 18126
DATA 184, 14800
DATA 196, 17400
DATA 201, 18950
DATA EOF, 0
'*******End of Program***********
Life is Sweet!
~QT-Pi~
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
Oh, Z!re...
Don't mind her.
We will NOT do your homework FOR you but we WILL help you with problems.
In our programming claas we needed to help each other with problems but we could NEVER DO anything for anybody do you follow?
What problems are you having?
I also don't understand all these objects. How can you have them without a TYPE?
Don't mind her.
![Wink :wink:](./images/smilies/icon_wink.gif)
We will NOT do your homework FOR you but we WILL help you with problems.
In our programming claas we needed to help each other with problems but we could NEVER DO anything for anybody do you follow?
What problems are you having?
I also don't understand all these objects. How can you have them without a TYPE?
"But...It was so beutifully done"
Hi QT, i know of a site that could help you with your homework. They will not do the work for you but they will help you in solving your problems AND people correspond through email as well! I will not bash this forum for their lack of understanding, I will look beyond my nose and send you an email with the url to the forum i mentioned above. I could give you all the help you need.
They call me QBERT
They call me QBERT
thanks qbert for the help
. us girls got the program running. i came across this forum under a random search. Seems to be an OKAY forum. would love to check out the forum you post on. we all have our Moment of Arrogance!
Life is Sweet!
~QT-Pi~
![Embarassed :oops:](./images/smilies/icon_redface.gif)
![Wink :wink:](./images/smilies/icon_wink.gif)
Life is Sweet!
~QT-Pi~
Life is Sweet!
~QT-Pi~
_____________________________________
"Its never too late to be what you might have been"
_____________________________________
We are the Negative to your Positive, the Positive to your Negative....Always
~QT-Pi~
_____________________________________
"Its never too late to be what you might have been"
_____________________________________
We are the Negative to your Positive, the Positive to your Negative....Always
In lack of a better response:
ZOMG LOL LIEK HELP ME WITH MY SCHOOL WORKS LOLZ!!11
IMA GURL LOLZ! SO LIEK HELP ME ZOMG!!!11
I wouldnt have reacted if you had entered a proper topic title, and explained your problem.
Oh, and not asking for people to email you, the forum exist for a reason.
Now, if you'll excuse me, I'll go and be arrogant with some old lady, or some guys balls..![Evil or Very Mad :evil:](./images/smilies/icon_evil.gif)
ZOMG LOL LIEK HELP ME WITH MY SCHOOL WORKS LOLZ!!11
IMA GURL LOLZ! SO LIEK HELP ME ZOMG!!!11
I wouldnt have reacted if you had entered a proper topic title, and explained your problem.
Oh, and not asking for people to email you, the forum exist for a reason.
Now, if you'll excuse me, I'll go and be arrogant with some old lady, or some guys balls..
![Evil or Very Mad :evil:](./images/smilies/icon_evil.gif)
I have left this dump.
Yes, we were lacking in information due to fanatical panic sydrome caused by sudden instructional program must-dos'. LMAO. Thanks Z!re We are going to be great friends. PSST " stay away from hairy balls and old ladies" !! the two dont mix
We just thought by viewing the whole code, someone could have helped us pin point the trouble, and after hours of curses and hair pulling we done it!
![Razz :P](./images/smilies/icon_razz.gif)
Life is Sweet!
~QT-Pi~
_____________________________________
"Its never too late to be what you might have been"
_____________________________________
We are the Negative to your Positive, the Positive to your Negative....Always
~QT-Pi~
_____________________________________
"Its never too late to be what you might have been"
_____________________________________
We are the Negative to your Positive, the Positive to your Negative....Always
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact: