Hi,
I'm afraid I'm a novice in c programming, and no matter what I do I cannot get a division to work:
Code:
//END RANGE INPUT
long double End;
printf("\nPlease enter the start of the range (Lower Bound):\n\n");
scanf("%Lf",&End);
//START RANGE INPUT
long double Start;
printf("\nPlease enter the end of the range (Upper Bound):\n\n");
scanf("%Lf",&Start);
//PLOT INTERVAL INPUT
long double Interval;
printf("\nPlease enter the interval between each plot:\n\n");
scanf("%Lf",&Interval);
//RANGE N INPUT
int N;
printf("\nPlease enter a value for N:\n\n");
scanf("%d",&N);
//RANGE SIZE CREATOR
long double SizeL;
SizeL = ((Start-End)/Interval);
printf("%Lf",Start);
printf("%Lf",End);
printf("%Lf",Interval);
printf("%Lf",SizeL);
No matter what I input for the values of 'Start', 'End' and 'Interval', the value of 'SizeL' always seems to be -2.
I've got no idea how to fix this, but any and all help would be greatly appreciated!