Wednesday, 19 March 2014

C Program for Use of const keyword

/* Use of const keyword */
main( )
{
float r, a ;
const float pi = 3.14 ;
printf ( "\nEnter radius of circle " ) ;
scanf  ( "%f", &r ) ;
a = pi * r * r ;
printf ( "\nArea of circle = %f", a ) ;
}

No comments:

Post a Comment