COMPUTER SCIENCE AND ENGINEERING
ALGORITHMS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Decision.
|
|
Loop.
|
|
Nested.
|
|
Sequence.
|
Detailed explanation-1: -Representing sequencing in pseudocode Writing in pseudocode is rather like writing in a programming language . Each step of the algorithm is written on a line of its own, in sequence. Consider this simple algorithm for calculating how old a dog is in dog years.
Detailed explanation-2: -Expert-Verified Answer Pseudocode is used to write program steps. No standard is provided to write a program in pseudocode. Logic design: Its function is to design the logic of a program.
Detailed explanation-3: -Pseudocode is understood by the programmers of all types. it enables the programmer to concentrate only on the algorithm part of the code development. It cannot be compiled into an executable program. Example, Java code : if (i < 10) i++; pseudocode :if i is less than 10, increment i by 1.
Detailed explanation-4: -Write Pseudocode for adding two given numbers Step 1: Start Step 2: Declare variables num1, num2 and sum. Step 3: Read values for num1, num2. Step 4: Calculate sum=num1+num2 Step 5: Display sum Step 6: Stop 2.