Example 1

 

#include <stdio.h>
#include <math.h>

int main(void)     // how to use sorintf and puts
{
   char buffer[80];

   sprintf(buffer, "An approximation of Pi is %f\n", M_PI);
   puts(buffer);

   return 0;
}

Hosted by www.Geocities.ws

1