hi, i'm trying to make a simple program to calculate the area and perimeter of a circle, but there's a little problem, whenever i enter a floating point number as the radius, like say 2.5 it calculates as if i entered only 2(without the .5) ( i hope that makes sense lol my english is bad) now I'm guessing it's because scanf("%d") can't read floating point numbers..but after i changed it to %f it still wouldn't work as intended :( - anyway here is the code any help is greatly appreciated :)
int Circle_Radius;
double Circle_Area, Circle_Perimeter, pi;
printf ("Enter Circle Radius: ");
scanf_s ("%d", &Circle_Radius);
pi = 3.14;
Circle_Area = pi * Circle_Radius * Circle_Radius;
Circle_Perimeter = 2 * pi * Circle_Radius;
printf ("Circle Perimeter is %.2f\n", Circle_Perimeter);
printf ("Circle Area is %.2f\n", Circle_Area);
return 0;