Hello,
I have a file like the following:
Where The Mind ~ Is Without Fear
I wrote the following program to compare characters and find the largest character:
function compare()
inn = open("input.txt","r")
ch = typemin(Int)
while !eof(inn)
if ch < Int(read(inn, Char))
ch = Int(read(inn, Char))
end
end
println(Char(ch))
end
compare()
The program prints the character u
instead of the character ~
.
Where is the problem with my program?
Thank you.