Programming & Algorithm Flow Chart & Input/Output Statement August 07, 2006
Flow Chart Decision Making Process Input/Output Connector Start/End Direction of Flow
The input statement Syntax: input( variable[, variable, …] ) E.g.: input(a) input(a, b)
The output statement Syntax: output(string/ variable[, string/variable, …] ) E.g.: output(a) output(a, b) output(“Hello guys..”) output(“The value of X is “, x)
Exercises Create an algorithm that asks two integers and display them back on screen. Create an algorithm that asks three integers, multiplies them, and displays the result on screen.
Exercises Create a algorithm that asks one integer (seconds) and converts it into hours, minutes, and seconds form. Display the result on screen. Create a algorithm that calculates and shows the area of a circle. The algorithm gets radius of the circle in floating-point number.
Exercises Create an algorithm that asks for two coordinates ({x1, y1} and {x2, y2}) in integer. Display the linear equation that through the coordinates in y=mx+c form. E.g.: The linear equation that through {1, 2} and {5, 7} is y=1.25x + 0.75.
Exercises The quadratic equation is shown by: a 2 + bx + c = 0 This equation has two roots. Create an algorithm that receives three inputs, such as a, b, and c. Then the algorithm prints two roots of the equation to the screen.

Flow Chart & Input Output Statement [3] M

  • 1.
    Programming & AlgorithmFlow Chart & Input/Output Statement August 07, 2006
  • 2.
    Flow Chart DecisionMaking Process Input/Output Connector Start/End Direction of Flow
  • 3.
    The input statement Syntax: input( variable[, variable, …] ) E.g.: input(a) input(a, b)
  • 4.
    The output statement Syntax: output(string/ variable[, string/variable, …] ) E.g.: output(a) output(a, b) output(“Hello guys..”) output(“The value of X is “, x)
  • 5.
    Exercises Create analgorithm that asks two integers and display them back on screen. Create an algorithm that asks three integers, multiplies them, and displays the result on screen.
  • 6.
    Exercises Create aalgorithm that asks one integer (seconds) and converts it into hours, minutes, and seconds form. Display the result on screen. Create a algorithm that calculates and shows the area of a circle. The algorithm gets radius of the circle in floating-point number.
  • 7.
    Exercises Create analgorithm that asks for two coordinates ({x1, y1} and {x2, y2}) in integer. Display the linear equation that through the coordinates in y=mx+c form. E.g.: The linear equation that through {1, 2} and {5, 7} is y=1.25x + 0.75.
  • 8.
    Exercises The quadraticequation is shown by: a 2 + bx + c = 0 This equation has two roots. Create an algorithm that receives three inputs, such as a, b, and c. Then the algorithm prints two roots of the equation to the screen.