[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
Pete's QBASIC Site Discuss QBasic, Freebasic, QB64 and more 2005-12-19T20:50:01-05:00 http://petesqbsite.com/phpBB3/app.php/feed/topic/1260 2005-12-19T20:50:01-05:00 2005-12-19T20:50:01-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=10134#p10134 <![CDATA[Totlas and Counters help]]> Statistics: Posted by Guest — Mon Dec 19, 2005 8:50 pm


]]>
2005-12-19T20:04:09-05:00 2005-12-19T20:04:09-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=10133#p10133 <![CDATA[Totlas and Counters help]]> *****

Statistics: Posted by moneo — Mon Dec 19, 2005 8:04 pm


]]>
2005-12-19T17:57:11-05:00 2005-12-19T17:57:11-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=10130#p10130 <![CDATA[Totlas and Counters help]]>
actually, it was the problem with the author if this thread...that was me thinking I was logged in.
......
Ok, so who are you anyway?
I thought I was logged in...again...and when I post this It might show up under guest...but as I stated before, I am registered as Ziggy. The help that peple have provided is more than enough, I should be able to figure out how to do most of it from here.

Statistics: Posted by Ziggy — Mon Dec 19, 2005 5:57 pm


]]>
2005-12-19T15:30:46-05:00 2005-12-19T15:30:46-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=10124#p10124 <![CDATA[Totlas and Counters help]]> *****

Statistics: Posted by moneo — Mon Dec 19, 2005 3:30 pm


]]>
2005-12-19T15:28:47-05:00 2005-12-19T15:28:47-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=10123#p10123 <![CDATA[Totlas and Counters help]]>
actually, it was the problem with the author if this thread...that was me thinking I was logged in.
......
Ok, so who are you anyway?

Here's some code to generate random numbers between -50 and 50. But bear in mind that zero will be one of these random numbers.

Code:

defint a-zRANDOMIZE TIMERLower = -50Upper = 50R = INT(RND * (Upper - lower + 1)) + lower
R is the random number between -50 and 50.
*****

Statistics: Posted by Guest — Mon Dec 19, 2005 3:28 pm


]]>
2005-12-19T12:18:07-05:00 2005-12-19T12:18:07-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=10118#p10118 <![CDATA[summing and counting]]>
To count something you must start with a counter set to zero!

Code:

sumpos=0
To test if something is positive check if it's greater than zero:

Code:

if num>0 then.....
To count, add "1" to the counter (conditionally, of course):

Code:

if num>0 then sumpos=sumpos+1
Play with that a little and see if you begin to understand.

Statistics: Posted by Zim — Mon Dec 19, 2005 12:18 pm


]]>
2005-12-19T08:29:12-05:00 2005-12-19T08:29:12-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=10117#p10117 <![CDATA[Totlas and Counters help]]> Some hints:-

-1 < ? < 1

Figure out what the question mark is and you have the conditional for testing positive or negative...

How do you count?
You add a number to the number you already have...
1+1=2
?+1=3
?+1=4
change the ? to a letter and you have algebra
x+1=4
so x is what?
and what was it in the previous statement?
Turn the algebraic statement around and you have a basic assignment statement:-
?=?+1

The rest, as they say is up to you...

Statistics: Posted by benjiboy — Mon Dec 19, 2005 8:29 am


]]>
2005-12-18T23:42:30-05:00 2005-12-18T23:42:30-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=10111#p10111 <![CDATA[Totlas and Counters help]]> Statistics: Posted by Z!re — Sun Dec 18, 2005 11:42 pm


]]>
2005-12-18T21:55:57-05:00 2005-12-18T21:55:57-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=10110#p10110 <![CDATA[Totlas and Counters help]]> Statistics: Posted by Ziggy — Sun Dec 18, 2005 9:55 pm


]]>
2005-12-18T21:54:25-05:00 2005-12-18T21:54:25-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=10109#p10109 <![CDATA[Totlas and Counters help]]>
anyway, for the unit we received about 10 worksheets with about 10 questions in each of them. In the beginning we started off with simple things like variables, and then we moved onto things like If statements and do loops. I was keeping up with most of it, up until we got to random numbers, I figured out how most of it works but I can't figure out how to choose from negative and positive random numbers (hence the reason why I couldn't do one of those questions) I understand most of it, the only trouble I have is with Totals, Counters, and some trouble with random numbers. If someone could show me how the three questions work I should be able to figure out how counters work and get the answer to my only question about random numbers.

Statistics: Posted by Guest — Sun Dec 18, 2005 9:54 pm


]]>
2005-12-18T21:34:02-05:00 2005-12-18T21:34:02-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=10107#p10107 <![CDATA[Totlas and Counters help]]> We've been having problems with the Log in, but I doub't that was the problem with the author of this thread.
*****

Statistics: Posted by moneo — Sun Dec 18, 2005 9:34 pm


]]>
2005-12-18T21:30:55-05:00 2005-12-18T21:30:55-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=10106#p10106 <![CDATA[Totlas and Counters help]]>
As soon as you've showed us how much of your homework assignment you've already done, I'm sure someone here would be willing to help you out. :D
Yes, exactly my feelings.
And by the way, since you're asking for code, not just a quick answer, why don't you register and become a member? It's nice to know who you're spending time and effort to help. This is a QBasic programming forum, not a question/answer radio program.
*****

Statistics: Posted by Guest — Sun Dec 18, 2005 9:30 pm


]]>
2005-12-18T17:12:08-05:00 2005-12-18T17:12:08-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=10099#p10099 <![CDATA[Totlas and Counters help]]>

Statistics: Posted by Nodtveidt — Sun Dec 18, 2005 5:12 pm


]]>
2005-12-18T14:56:10-05:00 2005-12-18T14:56:10-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=10098#p10098 <![CDATA[Totlas and Counters help]]>

1) Generate 40 random integers between -50 and 50 and then display how many of those number were positve.

2) Simulate the tossing of a coin 20 times, display if it was heads or tails for each toss and then display how many heads were tossed and how many tails were tossed.

3)Write a program that asks for a password, do not let the user continue until the password is geussed correctly. At the end display how many tries it took to get the correct password.

Help would be really appreciated, thanks.

Statistics: Posted by Guest — Sun Dec 18, 2005 2:56 pm


]]>