Pseudocode problem. Is this correct?

Create a pseudocode that accepts a name and a last name and display its full name

is this correct?

DO

ACCEPT FIRST NAME

ACCEPT LAST NAME

END DO

DO

CONCATENATE FIRST NAME AND LAST NAME INTO FULL NAME

END DO

DO

DISPLAY FULL NAME

END DO

Comments

  • No, pseudo codes must be like English statements like:

    Input first name and store it to variable A

    Input last name and store it to variable B

    Concatenate A and B and store it to variable C

    Output value of C

    You don't need to use DO.

  • right it is a few extremely tough pseudo code for the difficulty you defined. according to threat your instructor needs you to persist with some rules for pseudo code so which you may desire to take what I wrote decrease than and regulate it on your desires, with any luck this gets you began =======================================... consistent SALES_TAX = 0.05 function considerable( ){ PRINT "enter the dimensions of trim:" study length PRINT "enter the fee according to foot:" study costPerFoot call printTrimCost(length, costPerFoot) } function printTrimCost(length, costPerFoot){ costBeforeTaxes = length * costPerFoot costAfterTaxes = length * costPerFoot * (SALES_TAX + a million) PRINT "length of trim: " + length PRINT "Trim fee according to foot: " + costPerFoot PRINT "fee until now tax is: " + costBeforeTaxes PRINT "comprehensive fee after Tax is: " + costAfterTaxes return }

  • So if the first name is "John" and the last name is "Smith" then the full name is "JohnSmith"? You might want to make a small change to fix that..

Sign In or Register to comment.