In this code I seem to get zero, I'm not too familiar with as to why I can't change the variable length with the function I created. Any help could be useful.
#include <stdio.h>
double get_length(double a);
int main(int argc, char* argv[])
{
double length = 0;
get_length(length);
printf("%lf", length);
return 0;
}
double get_length(double a)
{
printf("What is the rectangle's length?\n");
scanf("%lf", &a);
return a;
}
When it prints it returns 0.0000