%-2d: A minus sign indicates left alignment, for example:
1 2 3
Right alignment:
1 2 3
2 means that when the received shaping data is less than 2, it will be filled with spaces on the right.
take for example
printf("%-2d ", 100); Will output: 100
printf("%-6d ", 100); Will output: 100
-Technology Department of Internet of Things School-enterprise Alliance