Draw a flowchart that will convert a given decimal number (N10) to its equivalent binary number (N2).
Create a program plan, an algorithm, and draw a flowchart that uses sequence structure, that would accept a radius of a circle and computes its area, circumference and diameter. Use constant declaration.
area = pi * radius2
circumference = 2 * pi * radius
diameter = 2* radius
Instruction: Create a program plan, algorithm, flowchart and pseudocode for the following cases:
A Department Store classifies its credit card holders as to local, national and international. A local card holder resides in Metro Manila, a national, anywhere in the Philippines and an international, anywhere in the world. The programmer must store a code 01, 02, and 03 for local, national and international card holders respectively. The program is to read the cards and store the proper code in each card.
An electric company bases its charges on two rates, customers are charged P25.00 per kilowatt-hour for the first 300 kilowatt-hours used in a month and P30.00 each for all kilowatt-hours used thereafter. Compute for the amount due from a customer after reading the kilowatt-hours used. Assume that there are 100 records of customers.
Write an algorithm and draw a flowchart that will convert a given decimal number (N10) to its equivalent binary number (N2).
Choose the correct answer
3 When a function receives a copy of the value stored in an argument used in the function call, it means the variable was _____.
a. pass by address
b. passed by value
c. passed by reference
d. assigned its original value when it was declared
Study the following function call in an algorithm:
Display “The results are”, getArea(len, wid)
2.4 Which of the following statements is also a valid function call?
a. if getArea (len, wid) = true then
b. if getArea (valLen, valWid) == true then
c. getrea (len, wid)
d. r = getArea(valLen, valWid )
Choose the correct answer
1. Which of the following is true with regards to functions?
a. A program can have more than one function and they must always return a value to the calling
module.
b. Values that are passed to a function in the calling module are referred to as parameters.
c. You can define your function inside another function as long as you want to use the
functionalities of it.
d. The function procedure will always receive values parameters and it may not alter the original
values.
2. Which of the following statement is true about overloaded functions?
a. Two or more functions with same name and consists of more than one parameter.
b. Two or more functions with the same name but different in their parameter list.
c. Two or more functions and they do not return any value to the calling module.
d. Two more functions with the same number of value and reference parameters.
Write True or False
1. In pseudocode you can have as many functions as you like but you must
only have a limited number of parameters.
2. The following is a correct call to a function that takes two value
parameters:
call calcFinal(valFormative, valSummative)
3. During the execution of a function procedure, control is passed back to the
calling module with the return statement.
4. The following is a valid function header:
sub calcValues(valN1, valN2)
5. Values that are passed to a function in the calling module are referred to
as parameters.
3. In computer science, a sorting algorithm is an algorithm that puts elements of a list in a
certain order. The most frequently used orders are numerical order and lexicographical
order.
I. Sort the [19, 7, 43, 3, 9, 82, 10] array using merge sort algorithm. Note that the
illustrations and labels are mandatory.
II. Write pseudo/source codes to merge [2, 4, 8, 9] and [3, 5, 6, 10] arrays into a
single sorted array.
III. Estimate the time complexity of merge sort algorithm showing the steps you followed including reduction.
The initial value of the radius of the circle is equal to one unit and each succeeding radius is one unit greater than the previous. Draw the flowchart and write the pseudocode that would compute for the individual area of 20 circles starting with r = 2 and determine how many circles whose radius is greater than 10. Print out each radius and the computed area of the circle and the total number of circle whose radius is greater than 10.