In first way 100 is an integer '100'. %d is used for printing integer values in printf() function. In 2nd way it is a string containing 3 characters '1','0','0'.'
1st way is used because if an integer result is stored in a variable (let x) Then we use x=100; printf("%d",x);
Here in this first statement the 100 is presented as a string while in the 2nd statement its represented as an integer. so it depend on you how you want to to use it. if you simply want to 100 then its doesn't matter.