One-Dimensional Arrays

//This program will demonstrate one-dimensional arrays.

#include <stdio.h>

main()
{
	float num[5]; /* declaring a one-dimensional array which allows
					num[0], num[1], num[2], num[3], num[4]*/
	float j= 1.0;
	int c = 0, i =0;
	
	num [1] = 2.5; num[2] = 1.0;
	j -= num[1] + num[2] + ++c;
	printf("%2i*%5.3f\n",c,j);

	while (i < 5)
	{
		
		num [i] = c++ + j++ + 2.5;
		printf("%2i**%3.2f**%4.1f\n",c,j,num[i]);
		i++;
	}
	
	return 0;
}
/*
 1*-3.500
 2**-2.50** 0.0
 3**-1.50** 2.0
 4**-0.50** 4.0
 5**0.50** 6.0
 6**1.50** 8.0
*/