uses crt code c 1998 by brian zhou all rights preserved problem 1 no strings attached 1995 regionals your task is to read in 5 sets of two strings of data from a data file called data1 each string will be on a different line the first and second line are a set the third and fourth line are a set up to the ninth and tenth lines beinga set each string will be a maximum of 20 letters long each string will contain uppercase and lowercase letters with no special characters nor spaces letters may be repeated any number of times you may assume that all data is the way we say it will be no error checking is necessary compare the two strings within each set we will say that two strings string1 and string2 are congruent if all of the following conditions are met a string 1 and string 2 each have the same number of letters b string 1 and string 2 have the same number of upper case letters c string 1 and string 2 have the same number of lower case letters d string 1 and string 2 each have the same letters if case is ignored output a summary table for all 5 sets of data so for example for the following data beginning of file ABCd DBaC ABCdE BcaDE zxEf aaCEF aBcd cAb aBc Abd end of file the output would be note that all data is left justified String 1 String 2 Congruence Conditions Met ABCd DBaC Yes All ABCdE BcaDE No A D zxEF aaCEF No None aBcd cAb No B aBc Abd No A B C var str array 1 2 1 5 of string 20 t text b bb byte bool1 bool2 bool3 bool4 boolean conditions string return completely capitalized string function upper s string string var x byte begin for x 1 to length S do s x upcase s x upper s end return number of upcase characters function upCaseChrs s string byte var x xx byte begin xx 0 for x 1 to length S do if ord s x 64 and ord s x 91 then inc xx upCaseChrs xx end return number of lowcase characters function lowCaseChrs s string byte var x xx byte begin xx 0 for x 1 to length S do if ord s x 123 and ord s x 96 then inc xx lowCaseChrs xx end check if strings s and ss have same characters function sameLetters s ss string boolean var x byte begin if bool1 false then bool4 false else begin for x 1 to length s do if pos upcase S X upper SS 0 then begin bool4 true delete ss pos upcase S X upper SS 1 end else begin bool4 false sameLetters bool4 exit end end sameLetters bool4 end check if strings s and ss are congruent function congruent s ss string boolean begin bool1 length S length SS bool2 upCaseChrs S upCaseChrs SS bool3 lowCaseChrs S lowCaseChrs SS bool4 sameLetters s ss congruent bool1 and bool2 and bool3 and bool4 end check strings and output results procedure checkStrSet sett byte begin conditions \'\' Write str 1 sett gotoxy 14 wherey write str 2 sett gotoxy 30 wherey if conGruent str 1 sett str 2 sett then write \'Yes\' else write \'No\' gotoxy 46 wherey if conGruent str 1 sett str 2 sett then conditions \'All\' else begin if bool1 then conditions \'A \' if bool2 then conditions conditions \'B \' if bool3 then conditions conditions \'C \' if bool4 then conditions conditions \'D \' end if conditions \'\' then write \'None\' else write conditions writeln end begin clrscr open text file DATA1 for read assign t \'DATA1\' reset T read text into 2D array for bb 1 to 5 do for b 1 to 2 do readln t str b bb close T WriteLn \'String 1 String 2 Congruence Conditions Met\' WriteLn for b 1 to 5 do checkStrSet b writeln end SAUCE00no strings attached code zoob think 9981117