Hello,
I have a file like below:
A B c
I want to write a program that produces output like the following:
A is Uppercase
B is Uppercase
c is Lowercase
I wrote the following program:
function UL()
inn = open("input.txt","r")
while !eof(inn)
if isuppercase(read(inn, Char))
println("$(read(inn, Char)) is Uppercase")
else
println("$(read(inn, Char)) is Lowercase")
end
end
end
UL()
But output is:
is Uppercase
is Uppercase
is Lowercase
Why?
Thank you.