Algorithm and flowchart for palindrome
Answers
Answered by
30
I have pinned the flow chart image
Attachments:
BavanaLand:
Hi
Answered by
6
Algorithm:
1. Input a String
2. Initialize Length to 0 , Flag to 0
3. While String[Length] is not equal to NULL
Increment Len gth
4. Initialize I to 0 , J to Length-1
While I is less than (Length/2)+1
If String[I] equal to String[J]
Flag=0
else
Flag=1
Increment I , Decrement J
5. If Flag equal to zero
Print it is a Palindrome
else
Print it is Not a Palindrome
6. Stop
Flowchart:
Attachments:
Similar questions
Math,
6 months ago
Social Sciences,
6 months ago
Hindi,
1 year ago
Hindi,
1 year ago
Social Sciences,
1 year ago
Science,
1 year ago