[C] How to print a variable in a field of size S? (S is inputted by the user) | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 5

[C] How to print a variable in a field of size S? (S is inputted by the user)

Everyone knows, %3d right? % means print a variable 3 means use at least 3 space to display d means the variable will be integer but is there anyway to print with a field of size S, where S in an integer inputted by the user?

17th Jul 2019, 7:04 AM
Md Faridul Islam
Md Faridul Islam - avatar
4 Respostas
+ 7
Interesting question šŸ‘šŸ‘
18th Jul 2019, 3:44 PM
Manoj
Manoj - avatar
+ 3
it worked! thanks a lot šŸ˜ƒ
17th Jul 2019, 7:17 AM
Md Faridul Islam
Md Faridul Islam - avatar
0
Int a[5]; gets( a); Printf("%s",a); You can use it
19th Jul 2019, 3:23 AM
Mohammad Ullah
Mohammad Ullah - avatar
0
Good question šŸ˜¼
24th Jul 2019, 7:27 PM
Youssef Eddaif
Youssef Eddaif - avatar