Hello Guys
I use the following printf to print the sum of two numbers. I always get the number with a lot of trailing zeros. How can make printf to ignore the zeros if the number is an integer?
23.000000 + 54.000000 = 77.000000
printf("%f + %f = %f",n1,n2,tot"
I use the following printf to print the sum of two numbers. I always get the number with a lot of trailing zeros. How can make printf to ignore the zeros if the number is an integer?
23.000000 + 54.000000 = 77.000000
printf("%f + %f = %f",n1,n2,tot"