Results 1 to 3 of 3

Thread: Q-basic help

  1. #1
    Almost A Newbie

    Join Date
    Mar 2007
    Thanked: 0 Times in 0 Posts

    Default Q-basic help

    If anybody could help me in anyways with my Q-basic would be greatly appriciated. Even if it's just understanding the problem better. But if you would like to do them...feel free to do that to.

    Write a SUB procedure to determine the area of a right triangle. The base and height of the triangle shoiuld be passed to the SUB procedure, which should then calculate and return the area. Use the following formula: area = 1/2 x base x hight.

    Write a SUB procedure that will recieve a specific number of quarters, dimes, nickels, and pennies, and then translate these coins into a dollar amount. The dollar amount should be returned to the calling program. For example, for the following values, the dollar amount returned to the calling program would be 2.02: quarters: 5; dimes: 3; nickles: 8; and pennies: 7.

    Fran's Frame Station specializes in framing custom artwork. Fran would like a program that will calculate the cost for framing a particular piece of art. The program should prompt theuser for the length and the width of the item. First the amount of glass needed (in square inches) and the cost of the glass should be determined. Assume the glass costs 2 cents per square inch. Next the cost of the framing material should be determined. The wood used for framing costs $1.45 per foot. Use SUB procedures as appropriate.

    Write a program to compute how much a person would weight on the moon and on the planets listed in the following table:


    Moon 16

    Jupiter 264

    Venus 85

    Mars 38

    Use the percentages in the right column to perform the conversions. Modularize the program, as appropriate.

    Fun-for-All Rental provides clowns for parties, seasonal celebrations, and other special occasions. The basic fee is $45 for the first hour and $25.99 for every additional hour. The company needs a program to help calculate its clients" bills. The program should call a SUB procedure to perform the actual calculations.

    Write a program that acts as a computerized address book. When the user enters a number corresponding to a person's name, the program should print that person's address, phone number, and birthdate. The name should be chosen from a menu of 5 to 10 names. The program should then branch to a SUB procedure to print the address, phone number, and birthdate. Develop your own date for the program.

    Shangri- La Realty needs a program to assist it's agents in keeping track of the various apartments available for rent. Write a program using SUB procedures that will give the user a choice of a stupid, one-bedroom, or two bedroom apartment. The monthly rent depends on the size of the apartment and whether it is to be furnished or unfurnished (this data should be entered by the user.) Use the following data:


    Studio $400 $450 $425

    OneBedroom $500 $500 $550

    TwoBedroom $600 $725 $665

    The program should print the apartment description, required deposit, and monthly rent according to the choices entered.

    At one time, the telephone exchanges were alphabetic, and most telephones still have letters of the alphabet on the dial. Write a program that uses a SUB procedure to convert an alpha-betic telephone number. At the end of the program, both the alphabetic and the numeric telephone numbers should be displayed.

  2. #2
    Almost A Newbie

    Join Date
    Mar 2007
    Thanked: 0 Times in 0 Posts

    Default Re: Q-basic help

    You have all the information you need to code the problem.

    For the first one...

    name your variables then do the sub thing and enter that the area = 1/2 x basevariable x heightvariable.

    I haven't coded in qbasic and I don't plan on learning it today I just did a google and it looks pretty simple so just lay the foundation to the program out then add the layers to it if that makes sense.

    Just think about what you want the program to do, and then code it. My professor always tells us to do that.

    Good luck.

    The second one you are going to ask them to enter the total number of qts, dimes, pennies, etc and then it's going to add the total and then tell them the amount of qts they entered and so on.

    Art work requires the user to enter the size of artwork and then it will calculate the material costs, seems easy enough.

    Moon planet one your just going to use multiplication and use the conversions provided.

    Clown pretty simple to figure out...

    I think you get the point, just think about it and then code it.

  3. #3

    Join Date
    Jul 2007
    Thanked: 0 Times in 0 Posts

    Default Re: Q-basic help

    they both are smart/

    U have to be smart to ask such things. U have to be smart to answer...:ok:




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT +10. The time now is 08:56 AM.