Skip to content

Latest commit

 

History

History
 
 

147-lettercase-percentage-ratio

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Lettercase Percentage Ratio

Challenge Description:

Your task is to write a program which determines (calculates) the percentage ratio of lowercase and uppercase letters.

Input sample:

Your program should accept a file as its first argument. Each line of input contains a string with uppercase and lowercase letters.

For example:

thisTHIS
AAbbCCDDEE
N
UkJ

Output sample:

For each line of input, print the percentage ratio of uppercase and lowercase letters rounded to the second digit after the point.

For example:

lowercase: 50.00 uppercase: 50.00
lowercase: 20.00 uppercase: 80.00
lowercase: 0.00 uppercase: 100.00
lowercase: 33.33 uppercase: 66.67