Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
area of a circle using pointer
// Calculate the area of a circle #include<stdio.h> #include<math.h> void areaperi(int a,float *b,float *c) { float k,j; k =2 * 3.1416 * a; j =3.1416 * pow(a,2); *b=k; *c=j; } main() { int rds =5; float area,perimeter; printf("\nEnter radious of a circle: "); // Input the radious of the circle scanf("%d",&rds); areaperi(rds,&area,&perimeter); printf("\nThe area of the circle is: %f",area); printf("The perimeter is: %f\n",perimeter); }
run
|
edit
|
history
|
help
0
Hello world.c
Avoiding visited networked paths
Dar
test
Policy based smart pointer
Search in a rotated sorted array two methods
reverse linked list
diamond
Power of an element
fcyyfc