Weekly Qbasic and Qb64 Lesson Topics
October 22, 2017, 01:26:50 am
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Want to see a specific Tutorial? ASK!
 
  Home Help Search Arcade Links Staff List Login Register  

Help on simple QBASIC program


Pages: [1]
  Print  
Author Topic: Help on simple QBASIC program  (Read 258 times)
QB513
Newbie
*
Posts: 1


« on: January 04, 2014, 12:39:28 pm »

Hello everyone,

I am going through a really good (but old) BASIC programming book - "Programming with Microsoft BASIC" Wayne M. Zage and I came across a programming problem that is probably really simple to code but I haven't found a way to make it work. I have attached a word file with the instructions. I appreciate any insight any of you might have.

Report Spam   Logged

Social Buttons

GarrisonRicketson
Admin
Administrator
Hero Member
*****
Posts: 583



WWW
« Reply #1 on: January 06, 2014, 06:50:05 pm »

Hello and welcome to the forum, and sorry about the slow response, it would be better if you could post the code here, if it is not to long,
Edited:
There is no code in that file, ?? If you read the book, ""Programming with Microsoft BASIC" Wayne M. Zage "", you should find out, how to write the code to do the problem,  Like wise, if you at least make an attempt at writing the code, and if it won't work, post what you have here, and maybe I can help you, but I do not have time to do your home work for you, and that is what the assignment looks like,..
sorry.
« Last Edit: January 06, 2014, 06:57:23 pm by GarrisonRicketson » Report Spam   Logged

yash
Newbie
*
Posts: 1


« Reply #2 on: October 10, 2015, 12:25:53 pm »

This will help you to understand QB64 Smiley
(? -Print , ' - comment )
? "my name"
locate 10 , 10

'this will print your name in column 10 and raw 10.
HAVE A GREAT JOB.
Thanx.
 Cool Cool Roll Eyes
Report Spam   Logged
Dimster
Newbie
*
Posts: 2


« Reply #3 on: August 30, 2017, 10:22:34 am »

I am new to this website, please consider this reply as me just exploring the site and trying out things to do. I'm sure QB513 has figured out this problem or abandoned coding altogether by now. If QB513 is familiar with Arrays and the Dim function, one way the problem could be solved is to dimension an array to hold each day's pay - so Dim Pay(30). You would then create a for/next loop . for P = 1 to 30. Within the loop you will need a line of code to do the math, ie take a the last day's pay and double it. Then store that value in Pay(P). (Note:Whatever variable you are using for the "last day's pay" should be made equal to "0" before the for/next loop. After the looping has ended you will need another for/next loop to calculate the total of all the values stored in Pay(30). As for the Printed Report, Yash has given a very good hint. The "?" is a shorter way to code the command word "Print" and the use of "Locate" for your columns and rows is the way to go. You simple need to print what you have stored in your Arrays and the Variable you have storing the total amount paid.

Seems there is quite a bid of room for these replies. The Preview shows only one line at a time but that's cool, it does pick up the Bolding and Italic and color.
Report Spam   Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Buy traffic for your forum/website
traffic-masters
Powered by SMF | SMF © 2016, Simple Machines