I need help desperately. To declare an array to hold 5 fives and pass the entire array to it and convert all the measurements in centimeters. The following is what I came up with:
#include <stdio.h>
#define SIZE 5
double calculateInches1 (double);
double calculateInches2 (double);
double calculateInches3 (double);
double calculateInches4 (double);
double calculateInches5 (double);
int main(void)
{
int a[SIZE] = {0,1,2,3,4};
int counter;
double inches1, inches2, inches3, inches4, inches5;
printf("Please enter value number 1 in inches:");
scanf("%1f",&inches1);
printf("Please enter value number 2 in inches:");
scanf("%1f",&inches2);
printf("\nPlease enter value number 3 in inches:");
scanf("%1f",&inches3);
printf("\nPlease enter value number 4 in inches:");
scanf("%1f",&inches4);
printf("\nPlease enter value number 5 in inches:");
scanf("%1f",&inches5);
printf("The conversion of value number 1: is %3.2f cm", calculateInches1(inches1));
return 0;
}
double calculateInches1(double inches1)
{
return inches1 * 2.54;
//printf("The conversion of measure in modifycalculateInches is %3.2f cm", calculateInches(inches));
}