PDA

View Full Version : procedural psuedocode to check a sentence if it is a pangram



Thandokazi
April 14th, 2011, 10:29 AM
:confused:
string: sentence ;
character: current ,
userResponse ;
integer: counter ,
notCrossedout ;
DO
Get (keyboard, REFERENCE: sentence ) ;
FOR current GOES FROM 'A' TO 'Z' ;
Write current
ENDFOR
FOR counter GOES FROM 0 TO Length ( sentence ) -1
current ← sentence [ counter ] ;
Cross off letter on the paper that matches current letter ;
ENDFOR
notCrossedOut ← 0 ;
FOR current GOES FROM 'A' TO 'Z' ;
IF ( current not crossed out)
notCrossedOut ← notCrossedOut + 1 ;
ENDIF
ENDFOR
IF (notCrossedOut = 0)
Display ('Sentence is a pangram') ;
ELSE
Display ('Sentence is NOT a pangram') ;
ENDIF
Display ('Do you want to test another sentence? Y/N') ;


Is there any one who can help me with this code to change it to a procedural psuedocode? plz help its urgent!

NovaAesa
April 18th, 2011, 08:32 AM
It looks all procedurey and pseudocodey already :P