import math
C = 2 * math.pi * r
C = 2*pi*R
C = Pi * r * 2 (r stands for radius)
Or you could do this:
C = Pi * d (d stands for diameter)
#include <stdio.h>
#define PI 3.142
int main(){
float r, C, A;
printf("What is the radius:
");
scanf("%f", &r);
C = 2 * PI * r;
A = PI * r * r;
printf("
Cincumference is and %f Area is %f
", C, A);
}
from math import pi
Circumference = pi * diameter
Circumference = pi * 2 * radius