n = 0 while (not end of file) read CH if CH in [AGCTN] then { n = n + 1 then s[n] = CH } end // while