Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore การโปรแกรมคอมพิวเตอร์

การโปรแกรมคอมพิวเตอร์

Published by weerathum, 2018-04-14 04:52:01

Description: หน่วยที่ 24 การประยุกต์ใช้งานอาร์เรย์ 2 มิติ

Search

Read the Text Version

AR Book การโปรแกรมคอมพวิ เตอร (Computer Programming)หนวยที่ 24 การประยุกตใชง านอารเรย 2 มิติ จดั ทาํ โดย นายอรรถชยั วรชัย

เน้อื หาสาระพอสังเขปโปรแกรม การกําหนดคาชนิดตัวอักษร ใหอารเรย2 มติ ิ 1 #include <stdio.h> 2 #include <conio.h> 3 int main ( ) 4{ 5 int row, column; 6 char cNum[2] [4] = { 7 {'G', 'O', 'O', 'D'}, 8 {'F', 'A', 'I', 'R'} 9 }; 10 11 printf( \" 0 1 2 3 \n\");

12 printf( \"+------+------+-----+------+ \n\");1314 for ( row = 0; row<2; row++ )15 {16 printf( \"%8d\", row);17 for ( column = 0; column < 4; column++)18 printf( \"|%8c\",cNum[row][column]);19 printf( \"|\n\" );20 printf( \"+ ------ + ------ + ------ + ------ + \n\");21 }22 getch ( );23 return 0;24 }

ผลลัพธข องโปรแกรม หนว ยท่ี 24 การประยกุ ตใชง านอารเ รย 2 มติ ิ int row, column; char cNum[2] [4] = { {'G', 'O', 'O', 'D'}, {'F', 'A', 'I', 'R'}


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook