Use | %.2f in fmt.printf
| Thanks & Regards Joshua Christudoss In Christ | For Christ | By Christ Sent from Yahoo Mail on Android On Thu, 13 Oct 2022 at 1:20 am, Jan Mercl<0xj...@gmail.com> wrote: On Wed, Oct 12, 2022 at 9:31 PM pravin chaudhary <pravi...@gmail.com> wrote: > I need to add zero after a decimal point to a float datatype but not able to > do. > > Required float value = 5.00 but getting as 5 > > Datatype should be float only!! > > Any help will be much appreciated! Is this perhaps what you're looking for? https://go.dev/play/p/LnaYYA_8VOg -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA40n-WV%2BD3QCa6q%3DcUNi338-cZTBkNyUpbODHxVYZL%2BiG2G_A%40mail.gmail.com. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/1713055413.830657.1665604581268%40mail.yahoo.com.