Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
401 B
3
Indexable
Never
#include <stdio.h>
#include <stdlib.h>

int main()
{   float r,pi=(3.141593);

    printf("Please enter thr radius of the circle ");
    scanf("%f",&r);
    if (r>0){
        printf("The perimeter of the circle is %f",2*pi*r);
        printf("\nThe area of the circle is %f", pi*r*r);
        }
        else
            printf("The radius must be positive number!");

    return 0;
}