Qbasicnews.com

Full Version: INT Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
1.)Find the number of positive integers that leave a remainder of 24 when divided into 4049.


2.) A person has an account with a pricpal of $10000. He withdraws $100 each month. The bank adds interest at 51/4% on the minimum balance during the previous month. (Note 51/4% is an annual rate. You must divide it by twelve to find the monthly rate) Print out the resulting mothly balance in chart form using only the TAB and SPC functions. Months should be numbered 1-12. You most round your answer to the nearest cent.


These are the hardest programs I have run accross yet. Any suggestions on how to complete it???? Thanx in advance!
We don't help with school assignments unless you show what you've done. =)


(Welcome! >^-^<)
never said this was for school just need some help as to how and do it. And if you really want to know its for a tutorial book where the answer is not shown: QBasic Using Subprograms.
Well still >_>



Show some work. You don't learn anythign if we do it for you or whatever.
You want to make a subprogram? Or do you mean a subroutine?
Ok... I'll give you a hint with the first one since everyone else is being so helpful.. Wink

To get the remainder of a division in QBasic you use the MOD operator.

For example:
11 / 5 = 2 with remainder 1
11 MOD 5 = 1

More examples:
20 MOD 7 = 6
56 MOD 12 = 8

See how it works? Smile
Thanx Dj just got through the first one and it worked great!
By the way, MOD doesn't work on negative numbers.
The following code will work on negatives. It's like a MOD done the old way.

M=X MOD 5
done another way which handles negatives:
M=X-5*INT(X/5)
*****