From 1af015020aafccbcb218f55e5d97fc6fe290e63b Mon Sep 17 00:00:00 2001 From: WongChinWee <93850449+WongChinWee@users.noreply.github.com> Date: Mon, 4 Apr 2022 14:11:11 +0800 Subject: [PATCH] Update exercise4.c //documentation section /* Exercise 3 - 2D array */ //pre-processor section #include //global variable section //main function section int main(){ //write here your program int theValue[3][3] = {{10,100,20},{50,20,40},{40,40,10}}; scanf(" %d", theValue[2][3]); printf("Value from Row 2 and Column 3 is %d", theValue[1][2]); return 0; } //user-defined section --- exercise4.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/exercise4.c b/exercise4.c index 5adfae3..f782528 100644 --- a/exercise4.c +++ b/exercise4.c @@ -1,5 +1,5 @@ //documentation section -/* Exercise 4 - 2D array */ +/* Exercise 3 - 2D array */ //pre-processor section #include @@ -9,11 +9,19 @@ //main function section int main(){ + //write here your program + int theValue[3][3] = {{10,100,20},{50,20,40},{40,40,10}}; + + scanf(" %d", theValue[2][3]); + + printf("Value from Row 2 and Column 3 is %d", theValue[1][2]); + + return 0; } -//user-defined section \ No newline at end of file +//user-defined section