C examples for Array:Array Value
Read array element one by one and output array elements
#include <stdio.h> int main( void ) { float expenses[13]; /*from w w w . j av a2s. c om*/ int count; for (count = 1; count < 13; count++){ printf("Enter expenses for month %d: ", count); scanf("%f", &expenses[count]); } for (count = 1; count < 13; count++){ printf("Month %d = $%.2f\n", count, expenses[count]); } return 0; }