computers

posted by .

I require an algorithm that will receive two integer items from a terminal operator, and display to the screen their sum, difference, product and quotient
How to do that?

  • computers -

    You do not require an algorithm to do the named operations because there is no repetition. You need a pseudocode (the steps named in English or an understandable language) or a computer programme.

    Think of the computer as a robot and give it instructions to do what you need done. Split the instructions into simple steps. Post what you have and we will give you our comments.

  • computers -

    Get first integer number
    Get second integer number
    Get operator
    if operator is +
    set total = first number + second number
    endif
    elseif operator is -
    set diff = first number - second
    endesif
    elseif operator is *
    set product = first number * second number
    endelseif
    else
    quotient = first number / second number
    end else

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. algorithm

    can someone tell me if this is correct. Write an algorithm that will display the sum for a given number of squares. In other words if the user enters the value 5, then the output should be 1^2 + 2^2 + 3^2 +4^2 + 5^2 = 55. sumsquare …
  2. Program Design

    You require an algorithm that will receive an integer from the screen, add 5 to it, double it, subtract 7 from it, and display the final number on the screen. Need help with the input, output, and processing. Also with the solution …
  3. Java

    I am supposed to convert a program i already made into a Java console application that uses the Scanner class to read the user's input. This is the code i have that i need to convert. I don't know where to start. Here is the code import …
  4. Math

    If a positive two-digit integer is divided by the sum of its digits, the quotient is 2 with a remainder of 2. If the same two-digit integer is multiplied by the sum of its digits, the product is 112. What is the two-digit integer?
  5. Programming

    Read two numbers from the keyboard Display the menu options as follows: 1 - computes the sum of two numbers. 2 - computes the difference (first minus second). 3 - computes the product of the two numbers. 4 - if the second number is …
  6. PRE CALC

    Which combination of limit properties is required to evaluate this limit?
  7. Math - PreCalc (12th Grade)

    Which combination of limit properties is required to evaluate this limit?
  8. programming

    I need a help regarding this. Compute and display the sum o 1st and 2nd number, Difference of sum and 3rd number, product of difference and 4th number, Quotient of product and 5th number using Eclipse Helios. My subject is OOP
  9. programming oop

    I need a help regarding this. Compute and display the sum o 1st and 2nd number, Difference of sum and 3rd number, product of difference and 4th number, Quotient of product and 5th number using Eclipse Helios. My subject is OOP
  10. computers

    create a program that will input two quizzes and will compute for sum,difference,product,quotient and average using printf and scanf. create your own design.

More Similar Questions