Posts

Showing posts from August, 2017

Day 2 Lecture / Lab

/* Day 2 lecture / lab work - Bones_Height */ #include <stdio.h> double mheight_femur(double f); double fheight_femur(double f); double mheight_humerus(double h); double fheight_humerus(double h); void main() {   double humerus, femur, mHeight, fHeight, hum_FEET, fem_FEET;   const int MALE = 1, FEMALE = 2;   double mHeight_FEET; double fHeight_FEET; /*  //scan bone lengths   printf("Enter lenght(in inches) of a femur and humerus respectivly: \n");   scanf("%2f %2f", &femur, &humerus);    //femur heights (in inches)   mHeight = mheight_femur(femur);   fHeight = fheight_femur(femur);   printf("femur heights (in INCHES) M: %2.2f in F: %2.2f in \n" , mHeight, fHeight); //puts the height into feet double mHeight_FEET = mHeight /12; double fHeight_FEET = fHeight / 12;   printf("femur heights (in FEET) M: %2.1f ft F: %2.1f ft \n" , mHeight_FEET, fHeight_FEET);   //humerus heights ...

Day 1 Homework

/* Day 1 lecture Home Work */ #include <stdio.h> double metersToMiles(int m); void main() {   //Program and test for meters to miles Program   double meters = 10;   double miles = meters * 0.000621371;     printf("%5.2f", meters);   printf(" meters equals ");   printf("%5.2f", miles);   printf(" miles \n");     //program to convert Celsius to Rnkin   double celsius = -666;   double rankin = (celsius + 273.15) * 9 / 5;       printf("%5.2f", celsius);   printf(" celsius equals ");   printf("%5.2f", rankin);   printf(" rankin \n");     //program to calculate aerea of elipse   double a=4;   double b=2;   double eArea = a * b * 3.1415;     printf("The area of the ellipse is: ");   printf("%5.2f", eArea);     double angle = 45;   double radius = 1;   double sArea = radius * radius * angle * 3.14 / 180;...