My Profile
Active Members
TodayLast 7 Days
more...
Awards & Gifts
Online Exams
Fresher Jobs
Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian
cities including Bangalore, Chennai, Hyderabad, Pune or Kochi
Resources
Find educational articles, blogs, discussion threads and other resources.
Colleges
Find details about any college in India or search for courses.
Advertisements
|
|
Posted By: Saranya Member Level: Diamond Posted Date: 27 May 2008 Category: Computer Basics
|
The following pseudocode has been written to find the average of 5 numbers accepted from the user:
begin numeric nNum, nTotal = 0, nAverage, nCounter = 1 while nCounter <= 5 begin accept nNum nTotal = nTotal + nNum nCounter = nCounter + 1 end nAverage = nTotal / 5 display ôAverage of the five numbers is: ô nAverage end
What would be the output if the five numbers entered were: 12, 8, 8, 12, 20 and the statement nAverage = nTotal/5 was altered to nAverage = nTotal/nCounter ?
Select Answer:
Average of the five numbers is: 10
Average of the five numbers is: 12
Average of the five numbers is: 15
Average of the five numbers is: 20
|
Your Test Score: 0 / 0
|
|
Next Question:
The following pseudocode has been written to display a series of numbers:
begin
numeric nNum1, nNum2, nNum3, nCounter = 2
nNum1 = 1
nNum2 = 1
display nNum1, nNum2
while nCounter < 10
begin
nNum3 = nNum1 + nNum2
display nNum3
nNum1 = nNum2
nNum2 = nNum3
nCounter = nCounter + 1
end
end
How many numbers of the series will be displayed if the statement nCounter = nCounter + 1 is altered to nCounter = nCounter + 2?
|
|
Previous Question:
The following pseudocode has been written to find the average of 5 numbers accepted from the user:
begin
numeric nNum, nTotal = 0, nAverage, nCounter = 1
while nCounter <= 5
begin
accept nNum
nTotal = nTotal + nNum
nCounter = nCounter + 1
end
nAverage = nTotal / 5
display ôAverage of the five numbers is: nAverageô
end
What would be the output if the five numbers entered were: 12, 10, 8, 12, 8
|
Related Questions:
Harry wants to convert the following query as a JOIN to a query as a SUBQUERY: SELECT stud_id, lname FROM student JOIN grades ON student.sub_id=grades.sub_id WHERE sub_name = 'Computer Science'. Identify the correct option.
Which of the following is an advantage of a one-tier application?
In which of the following page replacement policies, Balady's anomaly occurs?
When the keyword "extends" is used in a Java program, what does it implement?
What term is used to denote the server that is responsible for evaluating and creating the topology for intersite replication?
|
Categories
|
|
Submit Interview/Test Questions with Answers and make money from adsense revenue sharing program
Want to prepare for an interview? Try our aptitude tests and standard interview questions first.
|
|