Computer Science, asked by kausthubhshetty, 2 months ago

What is used if you want to print a float value with 3 digits after decimal point and 3 digits before decimal point. i will mark brainliest to first answer

Answers

Answered by llFairyHotll
1

Answer:

\huge\fbox \red{ANS} {\colorbox{crimson}{W}}\fbox\red{ER}♡࿐

Use the appropriate format specifier for restricting to the required decimal places for the given floating number.

%f is the format specifier for the floating numbers.

If we use %f it will print the entire number.

Try to the "%.nf" for printing the number up to the required places.

Here n was the required places that we need to print.

Example:

#include<stdio.h>

int main()

{

float f = 65.500000;

printf("%f\n",f); => prints 65.500000

printf("%.2f\n",f); => prints 65.50

rettun 0;

}

Answered by aayush8c3
0

Answer:

LOL IDK THE ANSWER

Explanation:

Similar questions