Print the Value of PI with the Precision of 12 Decimal Points using C-Program - Learn Engineering

All the news and updates relevant to Engineering. You can also Write a post here

Breaking

Monday, May 25, 2020

Print the Value of PI with the Precision of 12 Decimal Points using C-Program


Question

Print the Value of PI with the Precision of 12 Decimal Points.

TestCase Input Expected Output

3.142857142857




Answer

#include <stdio.h>
int main()
{
    printf("%.12f",22.0/7.0);
    return 0;
}



Follow Us More

1 comment: