I am looking for this for a while. Can anyone tell me how can I create interval array?
Example: interval = < 4;9 > int array[9-4+1] = {4,5,6,7,8,9}
I would like to insert number from interval to array and than I can work with values in array.
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int size_Of_Interval;
int a;
int b;
printf("Please specify the starting interval value: ");
scanf("%d", &a);
printf("Please specify the ending interval value: ");
scanf("%d", &b);
size_Of_Interval = (b-a+1);
printf("Interval from %d to %d. Interval has %d numbers\n", a, b, size_Of_Interval);
return 0;
}