1
0
Fork 0

countLettersInTextFile.d: improve the output format

This commit is contained in:
Intel A80486DX2-66 2024-03-14 22:10:17 +03:00
parent 4a81d7cd47
commit f2746abffb
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B
1 changed files with 1 additions and 1 deletions

View File

@ -11,5 +11,5 @@ void main(string[] argv)
count(filter!(a => isAlpha(a) || isWhite(a))(fileContent));
auto percentage = (totalLetters * 100) / cast(double)fileContent.length;
writefln("Percentage of letters: %.0f", percentage);
writefln("Letters: %.0f%%", percentage);
}