Using Pi with scanf in C

jeudi 26 juin 2014

Hello,



I'm trying to learn C and am only a couple weeks into it. Suppose I want to write a simple code for Trapezoidal integration and want to have the user input the integration limits via use of scanf. Also, suppose I want to focus on only trig functions such that a common limit is pi. How could I have the program recognize pi as the typed input? Let's assume I'm using the <math.h> statement "#define M_PI 3.141592653589793238462643". Thanks.





0 commentaires:

Enregistrer un commentaire