i need to do this in C programming we should include these schdule in our progra
ID: 3888702 • Letter: I
Question
i need to do this in C programming
we should include these schdule in our programmimg.
bos twick 3, home/class/f 1 12017 /2017 /homework bos twi ck 3SphyAd53 hone/class/fa112017 /2017 /honewrk hl.exe rogram to calculate data of a circle adius of the circle with the unit: 3.45 e are using a circle with radius 3.45 DATA OF THE CIRCLE The radius 3.450 meter The circumference 1 21.677 meter | The area 137.393 meter2 1 nter the ángle of observation CTheta) in radians 0. DATA F THE CIRCLE l Theta in radians 1 0.400 I Theta in degrees 1 22.918 l The curve length1 1.380 meter 0.40 radians Trigonometry table for Theta l sin 1 0.389 Cos 10.921 tan 10.423 ostwick 30phydj3 home/class/fa112017/2017/honesorkExplanation / Answer
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
int main(){
char unit[20];
char temp1[20];
char temp2[4];
double radius;
int count = 0;
double rad;
int i;
printf("Program to calculate data of a circle ");
printf("Radius of the circle with unit :");
scanf("%s",unit);
for (i = 0; unit[i] != ''; i++) {
if ((unit[i] >= '0' && unit[i] <='9') || unit[i] == '.')
temp1[i] = unit[i];
else {
temp2[count] = unit[i];
count++;
}
}
temp1[i] = '';
temp2[count] = '';
radius = atof(temp1);
printf("We are using a circle with radius %.3f %s ", radius, temp2);
printf("DATA OF THE CIRCLE ");
printf("The radius : %0.3f ", radius);
printf("The circumderence : %0.3f ", 2 * radius * M_PI);
printf("The area : %0.3f ", M_PI * radius * radius);
printf("Enter the angle of observation (Theta) in radians) :");
scanf("%lf", &rad);
printf(" DATA OF THE CIRCLE ");
printf("Theta in radians : %0.3f ", rad);
printf("Theta in degrees : %0.3f ", rad * 57.2958);
printf("The curve length : %0.3f ", radius * rad);
printf("Trigonometry table for Theta = %0.2f ",rad);
printf("sin : %0.3f ",sin(rad));
printf("cos : %0.3f ",cos(rad));
printf("tan : %0.3f ",tan(rad));
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.