[圖解C] 數字陣列基本操作

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int Leap[]={31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
        nLeap[]={31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
       
    int i;
   
    // array star from 0 to n-1
    for (i=0; i<12; i++)
    {
        printf("%d\t %d\n", i, Leap[i]);
    }
   
    printf("nLeap[1] + Leap[1] = %d + %d = %d\n", nLeap[1], Leap[1], nLeap[1]+Leap[1]);
   
    system("pause");
    return 0;
}