Programming

posted by .

Write a program (pseudocode) that would calculate and display the results for the multiplication table for values ranging from 1 to 100.

This what I have so far:
Declare X, Y, Z As Integer
Write “10 x 10 Multiplication Table”
For (X = 1; X<=10; X++)
For (Y = 1; Y<=10; Y++)
Set X * Y = Z
Write Z
End For(Y)
End For(X)

But I believe this would write everything on a separate line, and I need it to write in a 10x10 table manner.

  • Programming -

    Congratulations, this is an excellent pseudocode!

    There are only a few small details to attend to.

    You have already mentioned about presentation in a table form. Yes, this takes a little attention.

    Unfortunately, the physical mechanism for tabulation varies from one language to the other. However, most languages (including Java, C, C++, Visual Basic Fortran and many others) have a way to limit output to a specified number of characters, and to control whether to continue output on the same line or to skip to a new line.
    So all you have to do is to replace "Write Z" by a generic statement like:
    "Write Z in fixed format, right-justified 5 characters"
    And insert a command
    "Skip to newline"
    between End For(Y) and End For(X).
    That will take care of the presentation.

    Furthermore, if you like, you can also indicate the multiplier and multiplicand at the top and on the left to make it look like a real multiplication table. This is a little more complicated, but not difficult.

    If you like to give it a try, I will be glad to look over your pseudocode.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. IT 210 Pseudocode (Help needed ASAP)

    I was wondering if anyone would be able to help me with the following pseudocode so that it looks good to turn in. Any changes would be helpful. Completing Homework Main Module Declare FindReading As Real Declare ReadReading AS Real …
  2. programming

    I am supposed to modify this program so it begins by asking the user for the number of values. The program then uses a loop to read the specified number of values and then display their average. program is below that i worked on in …
  3. college

    What will the following pseudocode program display?
  4. Programming

    Design a program in pseudocode that calculates the amount of money a person would earn over a period of time if their salary is one penny the first day, and then doubles each day. The program should ask the user for the number of days. …
  5. Programming

    Design a program in pseudocode that calculates the amount of money a person would earn over a period of time if their salary is one penny the first day, and then doubles each day. The program should ask the user for the number of days. …
  6. Programming

    Write a pseudocode program that asks the user for an integer between 1 and 12. The program is to calculate the times table for that number. So for example, if the user enters a 2, then the program has to calculate 2x1 and display the …
  7. programming

    How to write a program to create a class roster using an array?
  8. Programming

    Write a program that would calculate and display the results for the multiplication table for values ranging from 1 to 100. Your program should print the output for each step and output a new line after 10 items. Provide your program …
  9. Programming

    I must write Analysis, IPOChart, Hierarchy Chart, Flowchart, GUI Design, Pseudocode, and Test Cases for an office supply inventory tracking program Here is the Pseudocode that i have so far: Main Module 1 Declare PensAmount As float …
  10. computer science

    Mr Ali has given a test to his class. He would like to have the average score for the class as well as the highest and lowest scores. Write a pseudocode to calculate and display these values. Then convert your pseudocode into a program …

More Similar Questions