Pseudo Code :
Human readable informal description of a algorithm/Program.
- Language Independennt.
- Structure your code before writing it.
- Fastest way to verify.
- Input[ read N]
- Assignment [SUM ← 0]
- Output [print SUM]
- If Else [if | < N then ...end else then ...end]
- While Loop [while | < N do...end]
- Exit [exit]
Pseudo code:
Read N
i ← 2
While i < N do
if N is div by i
print"Not Prime"
exit
end
i ← i + 1
end
print "Prime"
exit
0 Comments