ok I hope this doesn’t get locked but this is the only place I can go to get help. ive tried googling it but i cant find anything. So to keep me from failing my college class, please help.
Ok my teacher wants me to replace my PRINT command with something else so that more data will be displayed. Does anyone know what commands can replace PRINT in order to display something else? Here is my program.
REM description: this program calculates
REM the billing amount for a
REM company running a copying
REM service
REM---------------------------------------
REM *The first 500 copies are billed at
REM 5 cents per copy
REM
REM *The next 500 copies are billed at
REM 4 cents per copy
REM
REM *Any additional copies are billed at
REM 3 cents per copy
REM---------------------------------------
REM Customer Copies
REM -----------------------------
REM XYZ Amalgamated 1,200
REM ABC Industries 200
REM TR Systems Limited 800
REM
REM***************************************
CLS
PRINT "Customer: Billing Amount:"
PRINT " "
READ cust$, Copies
DO WHILE cust$ <> "end"
IF Copies > 1000 THEN
LET a = ((Copies - 1000) * .03) + 45
PRINT cust$; " $"; a
ELSEIF Copies > 500 THEN
LET b = ((Copies - 500) * .04) + 25
PRINT cust$; " $"; b
ELSE
LET c = Copies * .05
PRINT cust$; " $"; c
END IF
READ cust$, Copies
LOOP
REM**************data statnments**********
DATA "xyz Amalgamated", 1200
DATA "ABC Industries", 200
DATA "TR Systems Limited", 800
DATA "end",
END
-
This is BASIC people. If you look at it, it makes sense. It's a program for charging people for copies isn't it? 4 cents for the 1st copy, 3 cents for the rest. hehe....post this in zanzibar or I will... [Edited on 12/13/2005]
-
Did it work? I looked in the QBASIC book in my Design & Logic class today and I found something about a PRINT USING statement. It seems be QB's version of formatnumber/currency. So, let's say that x is the variable that equals 5. To output it as 5.00, you would put: PRINT USING #.##; x If you wanted to output it as $5.00, you would put: PRINT USING $.$$; x *Note: There may have been quotes around the #'s and $'s. I don't remember.
-
ok jebus, hows this
-
Keep in mind that this is for VB. It is most likely different for QB. Centering: dim center as integer dim title as string REM center and title can be named anything you want REM title is the heading (I don't know how to center the whole thing) Font.Size = 10 ScaleMode = 4 REM ScaleMode 4 is characters title = *insert heading* center = (Me.ScaleWidth - TextLength(title)) / 2 PRINT Tab(center); title ------------------------------------------- I'm almost certain centering is done differently in QB. In fact, I think my teacher showed us how to do it in QB, but I don't remember. As for the decimal places, it's simple. To output 5 as 5.00, you do this: PRINT FormatNumber(a, 2) Where "a" is the variable that equals 5 and the 2 is however many decimal places you want. For outputting 5 as $5.00, it's the same thing, except you use FormatCurrency instead of FormatNumber.
-
come on jebus u almost got it. just tell me how to do it
-
[quote][b]Posted by:[/b] Jebus Saves Do you mean like changing the form background, font size, centering, etc.? Or do you mean like displaying 5 as 5.00 or something like that?[/quote] YES YES YES. I THINK U GOT IT. TELL ME HOW TO CENTER, AND DISPLAY 5 AS 5.00 AND I WILL ADD U TO MY SIG AS THE ABSOLUTE SMARTEST PERSON IN THE WHOLE FREAKING WORLD
-
WOW! Someone else that uses q-basic besides me! I use gw-basic though. It's a little better than q-basic.
-
I'm a Junior in high school and taking a Design and Logic programming class (both QBASIC and Visual Basic are in the curriculum). Even [b]I[/b] don't understand what you mean by different displays for output info. Sorry.... [Edited on 12/12/2005]
-
Do you mean like changing the form background, font size, centering, etc.? Or do you mean like displaying 5 as 5.00 or something like that? In Visual BASIC you use FormatNumber and FormatCurrency for the latter. I don't know if it's the same for QBASIC though. Maybe it's because you have "$" in your print statement. In VB, if you use FormatCurrency, the "$" will appear automatically.
-
[quote][b]Posted by:[/b] kd5shw [url=http://www.bungie.net/fanclub/mathematics/GroupHome.aspx ]fixed[/url] I'm not sure I understand the problem you are having too well either. What do you mean by "more data".[/quote] Neither do i...but...i think he wants it to display the data in a different way. a different look if u will
-
[url=http://www.bungie.net/fanclub/mathematics/GroupHome.aspx ]fixed[/url] I'm not sure I understand the problem you are having too well either. What do you mean by "more data"? [Edited on 12/12/2005]
-
[quote][b]Posted by:[/b] kd5shw Sorry I don't know qbasic. You could post this in the [url=http://www.bungie.net/fanclub/81112/Forums/topics.aspx?f orumID=87069]Mathematics Group[/url] and get an answer from kwinse. If it was c I might be able to help.[/quote] error error..cannot find link. yea we all know c++, nothing special lol
-
Sorry I don't know qbasic. You could post this in the [url=http://www.bungie.net/fanclub/81112/Forums/topics.aspx?f orumID=87069]Mathematics Group[/url] and get an answer from kwinse. If it was c I might be able to help. I'm not sure I understand the issue either. What is it doing wrong, and what would you like it to do. I maybe able to google it. [Edited on 12/12/2005]
-
[quote][b]Posted by:[/b] WarLordLAN [url=http://www.bungie.net/Account/Profile.aspx?memberID=9842 1]PM this guy.[/url] He should be able to help. I would like to help but I know a little C++ and Delphi5 but thats it.[/quote] thanks dude, i hope i just PM'd bill gates cuz i think he is the only person who can help me now
-
[url=http://www.bungie.net/Account/Profile.aspx?memberID=98421]PM this guy.[/url] He should be able to help. I would like to help but I know a little C++ and Delphi5 but thats it.
-
if i dont figure this out my teacher WILL fail me
-
[quote][b]Posted by:[/b] dr rocko Doing homework on a school day? What have you become![/quote] Dude school is out in like 2 days. i should be studying my ass off for finals, not trying to finish some programs from like 2 months ago. Now does anyone know what i can replace PRINT with!!?? hey mods are smart i bet they could answer my question. o wait if they were smart they wouldn’t be mods. jk but i had to do it hahahaa [Edited on 12/12/2005]
-
Doing homework on a school day? What have you become!
-
[quote][b]Posted by:[/b] dr rocko Hey i live in Arizona. Wait i mean *head implodes*[/quote] yea, ime sitting at the mesa community college library right now. Seems I am one of a few slackers still doing home work on the 12 of December
-
[quote][b]Posted by:[/b] XxTaterSaladxX u mean shishka?[/quote] yea i mean shishka. but considering its not a real word...i can never rember how to spell it
-
[quote][b]Posted by:[/b] XxTaterSaladxX [quote][b]Posted by:[/b] richcricketz [quote][b]Posted by:[/b] XxTaterSaladxX hehe. post this in Zanzibar and see what happens. [/quote] i can tell u what would happen right now. shaskta takes one look at it, pulls up my IP address, finds my home address, drives to Arizona, and blacklists my account with my own computer [/quote] u mean shishka?[/quote] Hey i live in Arizona. Wait i mean *head implodes*
-
[quote][b]Posted by:[/b] MCs-blam!- This thing right here --------> " Im pretty sure it recognizes that as PRINT.[/quote] nope not working. got any other ideas
-
[quote][b]Posted by:[/b] richcricketz [quote][b]Posted by:[/b] XxTaterSaladxX hehe. post this in Zanzibar and see what happens. [/quote] i can tell u what would happen right now. shaskta takes one look at it, pulls up my IP address, finds my home address, drives to Arizona, and blacklists my account with my own computer [/quote] u mean shishka?
-
[quote][b]Posted by:[/b] XxTaterSaladxX hehe. post this in Zanzibar and see what happens. [/quote] i can tell u what would happen right now. shaskta takes one look at it, pulls up my IP address, finds my home address, drives to Arizona, and blacklists my account with my own computer
-
[quote][b]Posted by:[/b] richcricketz [quote][b]Posted by:[/b] XxTaterSaladxX wtf !?! *head explodes*[/quote] Wow if ur head is exploding i would seriously consult a geek. u may have a virus [/quote] . [Edited on 12/12/2005]
-
This is a simple program. You shouldnt have brain failure.