For each program just hand write the results to turn in feel
For each program just hand write the results to turn in, feel free to use a compiler to run your code to see if it works. I am grading this based on code elements and if the code functions. Write a program to convert meters to miles. Write a program to compute the area of a circle with radius r. Write a program to compute the area of a sector of a circle where d is the angle in degrees between the radii. (A = (t*t*theta)/2 where theta is d in radians). After completing each of these programs, go back are look at your code. Are there any pitfalls where the code could \"blow-up\" with inconsiderable inputs? How do you think we will go about mitigating these risks?
Solution
*************Q1******************
#include<stdio.h>
#include<conio.h>
int main(){
float meter=0.000621371;
float miles;
printf(\"Enter miles\ \");
scanf(\"%f\", &miles);
printf(\"Miles: %f\ \",miles*meter);
getchar();
return 0;
}
************ close Q1*******************
*****************Q2****************
#include<stdio.h>
#include<conio.h>
int main(){
float area;
float r;
float pi=3.14159;
printf(\"Enter Radious\ \");
scanf(\"%f\", &r);
printf(\"Miles: %f\ \",pi*r*r);
getchar();
return 0;
}
**********************
