
Question
Get a Float value and Print the Float value Without any Trailing Zeros
Sample TestCase Expected Output
1. 12.520012.52
2. 567.90000567.9
Answer
#include <stdio.h> int main() { double num; scanf("%lf",&num); printf("%g",num); return 0; }
No comments:
Post a Comment