Fixed right align with negative number
This commit is contained in:
parent
3cb41d15d7
commit
8c82e37a20
|
@ -20,7 +20,7 @@ while (!string.IsNullOrWhiteSpace(text))
|
|||
var character = (char)i;
|
||||
var percentage = 100 * counts[i] / totalLetters ;
|
||||
// string output = counts[i] + " - " + character + " - " + percentage + "%";
|
||||
Console.WriteLine(String.Format("{0,0} - {1,1} - {2,2}%", counts[i], character, percentage));
|
||||
Console.WriteLine(String.Format("{0,-3} - {1,1} - {2,2}%", counts[i], character, percentage));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue