Advertisement
kk258966

9/19 進階程式設計上課程式 練習一

Sep 19th, 2014
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.35 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. int main(void)
  4. {
  5.     int i;
  6.     int no[6];    //宣告一個大小為6的陣列,no[0]-no[5] (no可改)
  7.    
  8.     no[1]=25;
  9.     no[2]=30;      
  10.     no[3]=35;
  11.     no[4]=40;
  12.     no[5]=45;
  13.    
  14.    
  15.     for(i=1;i<=5;i++)
  16.     {
  17.        printf("no[%d]=%d \n",i,no[i]);
  18.     }
  19.     system("pause");
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement