This tutorial cover 1D-array and 2D-array, please answer all questions
This tutorial consists with 5 questions:
- Exercise 1
- Exercise 2
- Exercise 3
- Exercise 4
- Exercise 5
Try to complete this tutorial by commit your changes and read the question carefully ⭐
Declare an array (1D) name currencyWorld of type float that can store up to 5 floating-point number. Initialize the value for currencyWorld with 4.50, 5.55, 3.65, 1.20, 6.56. Next, print the third element from the array.
Declare an array (1D) name myName of type char that can store your full name in the array and print the output as follow:
- My Name is _____, Bachelor of Information Technology from Universiti Malaysia Kelantan
Declare an array (2D) name myAlphabet of type char that can store listed value from the table below. Next, print the value from row 3 column 3 as follow:
- Character from Row 3 and Column 3 is _____
Char 1 | Char 2 | Char 3 |
---|---|---|
h | g | f |
c | n | p |
o | m | q |
Declare an array (2D) name theValue of type int that can store listed value from the table below. Next, print the value from row 2 column 3 as follow:
- Value from Row 2 and Column 3 is _____
Value 1 | Value 2 | Value 3 |
---|---|---|
10 | 100 | 20 |
50 | 20 | 40 |
40 | 40 | 10 |
Write a program to find the average of 5 numbers insert by the user using arrays and print the average value as follow:
- Average value is _____