Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
0 of .
Results for:
P. 1
terbaru assigment 28.03.2013

# terbaru assigment 28.03.2013

Ratings: (0)|Views: 6 |Likes:

### Availability:

See more
See less

04/02/2013

pdf

text

original

PAGE 20 [Q1 & Q2]1. A pseudo code that converts the distance in mile to kilometre is given as in Algorithm 2.3.Usinf the Microsoft Word software, develop this pseudo code according to the stepsexplained in the first concept.Algorithm 2.3: Convert the distance in mile to kilometer 1.

Start2.

Set KM_PER_MILE to 1.6093.

Set Distance_Mile to 1004.

Convert the distance in mile to kilometres using theformula:Distance_Kilo = KM_PER_MILE x Distance_Mile5.

Display the distance in kilometer 6.

End2. Algorithm 2.4 is pseudo code that reads the radius of a circle, and computes the area of thatcircle. Using the Microsoft Word software, develop this pseudo code.Algorithm 2.4 : Compute the area of circle the area of a circle1.

Start2.

Set PI = 3.141593.

Calculate the area of acircle using the formula:Area = Radius x Radius x PI5.

Display Area6.

End

PAGE 27 & 28 [EXERCISE 3 : Q1,Q2,Q3 & Q4]Given the following set of problems. Analyze each problem and identify the input, fomulaand the output. Write the psedo code and draw the for each.1.

Read three numbers. Calculate the sum of those three numbers and find the average.Display all three numbers, as well as the total of those numbers an the in average.
Output:
average the numbers of three numbers
Input:
the three numbers are given, num1, num2, num3
Formula:
Average = Sum total of number divide total number of number
Pseudocode design of the problem:
StartRead three numbers, num1, num2, num3Calculate the average using formulaAverage = Sum total of number divide total number of numbersPrint the Average of numbersEnd
Flowchart design of the problem:

,num1, num2, num3
Calculate the average using formulaAverage= sum total of number divide totalnumber of numbersPrint the Average of numbersEnd

2.

Calculate the average weight of four students. Attempt to analyze this problem bysating i
t’s input, output and the formula required to determine the average weight.Display each student’s weight calculated.

Output:
Average weight of four student
Input: a)
weight of student
b)
number of student
Formula:

 
    
Pseudocode design of the problem:
StartRead weight of student, student1, student2, student3, student4calculate the average using formula :
     

Show the Average weight of studentEnd
Flowchart design of the problem: