What does this program do, int input and calculation - C Data Type

C examples for Data Type:int

Description

What does this program do, int input and calculation

Demo Code

#include <stdio.h> 

int radius, area; 

int main()/* w  ww  . j  a  v  a  2  s.  co m*/
{ 
    printf( "Enter radius (i.e. 10): " ); 
    scanf( "%d", &radius ); 
    area = (int) (3.14159 * radius * radius); 
    printf( "\n\nArea = %d\n", area ); 
    return 0; 
}

Result


Related Tutorials