What shall be value of x in the following pseudocode?
x=0;
For (t=1; t < N; t++)
For (p=1;p<=t;p++)
x=x+1;
Endfor
1) x = N+1
2) x=N(N+1) / 2
3) x = N(N-1)/2
4)
Answers
Answered by
8
Answer:
Step-by-step explanation:
Always x=x. Not other alphabet. But in maths. It may be in between negative infinite to positive infinite
Answered by
0
Value of x in the following pseudocode is x = N(N-1)/2 ( Option C is the correct answer)
- Algorithm development is aided by pseudocode, a made-up, informal language. An algorithmic detail design tool is pseudocode. Pseudocode follows some fairly simple rules.
- Indentation is required for all statements that demonstrate "dependency." While, do, for, if, and switch are a few of them.
- Pseudocode is a made-up, informal language that programmers use to create algorithms. A "text-based" technique for designing details in algorithms is pseudocode.
- Pseudocode's regulations are comparatively simple. You must identify any statements that demonstrate "dependence." They consist of while, do, for, if, and switch.
- It is merely an algorithm that has been implemented with plain English text for informational annotations. It has no grammar like any other programming language, therefore a machine cannot compile or interpret it.
Hence, Value of x in the following pseudocode is x = N(N-1)/2
#SPJ3
For more information about Pseudocode, you can refer to the following questions
what is pseudocode?
https://brainly.in/question/2484360
Define: a) Pseudocode
https://brainly.in/question/25509984
Similar questions