Need help with QuickBasic...
Posted: Sun Dec 07, 2003 4:45 am
Hey.
Im take a Computer Science course and I need some (well lots of)help with how do this stuff. Firts of im not sure how to loop this:
¦INPUT "please enter two numbers separated by a comma: ", num1, num2
¦product = num1 * num2
¦PRINT "the product of "; num1; "and "; num2; "is "; product
¦END
And then I need to awnser this:
Ask the user for his first name and store it in a variable named First$. Ask the user for his last name and store it in a variable name Last$. Have your program print the user’s last name first followed by a comma, then his first name to the screen.
And finaly theres this:
Workers at a factory work between 20 and 40 hours per week. They are paid using a rate class. If the rate class is an “A”, the worker makes $10 per hour. If the rate class is a “B”, the worker makes $14 per hour. If the rate class is a “C”, the worker makes $18 per hour. Ask the user to enter the employee’s name, hours worked and pay class. Calculate the appropriate gross pay. Print to the screen, the workers name, hours worked, rate class and gross pay.
Any help would be VERY much appreciated.
Im take a Computer Science course and I need some (well lots of)help with how do this stuff. Firts of im not sure how to loop this:
¦INPUT "please enter two numbers separated by a comma: ", num1, num2
¦product = num1 * num2
¦PRINT "the product of "; num1; "and "; num2; "is "; product
¦END
And then I need to awnser this:
Ask the user for his first name and store it in a variable named First$. Ask the user for his last name and store it in a variable name Last$. Have your program print the user’s last name first followed by a comma, then his first name to the screen.
And finaly theres this:
Workers at a factory work between 20 and 40 hours per week. They are paid using a rate class. If the rate class is an “A”, the worker makes $10 per hour. If the rate class is a “B”, the worker makes $14 per hour. If the rate class is a “C”, the worker makes $18 per hour. Ask the user to enter the employee’s name, hours worked and pay class. Calculate the appropriate gross pay. Print to the screen, the workers name, hours worked, rate class and gross pay.
Any help would be VERY much appreciated.