Create a Just BASIC console application that calculates and displays First And Last Name, Gross Pay, Taxes Withheld, and Net Pay based on specified user input. In English Using (Just Basic v2.0).
Answer)
The code is below, ' is used for comments.
'Taken input by the input command
'fn$ is used for string
input "Enter First name: "; fn$
input "Enter Last name: "; ln$
'hw is used for hours worked
input "Enter the hours you worked: "; hw
'hw inpuger input is used for hourly rate
input "Enter the hourly rate: "; hr
'gp is used for gross pay
gp=hw*hr
'print is used for display the variable
'tw is taken as tax withheld which is taken as 0.2
tw=gp*0.2
'display the variable by print command
print "First Name: ";fn$
print "Last Name: ";ln$
print "Gross Pay: ";gp
print "Tax withheld: ";tw
'net pay is calculated by grosspay less tax withheld
np=gp-tw
print "Net Pay: ";np
Screenshot
Get Answers For Free
Most questions answered within 1 hours.