I’ve been trying to calculate the value of pi as a float value (datatype) but my output shows 0.0000 when i try to calculate 22/7
If i try to get the output as an integer by using %d datatype, the same code gives ‘3’ as an output.
When i try to put %f instead of %d in the same code it is unable to give me an answer.
P.S. im just a beginner please try to help me out
enter image description here
New contributor
Ashmit Iyer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2