Array Part 1 Name: - Student Id: - Group
Array Part 1 Name: - Student Id: - Group
4. Write a program that read ratings from 10 users and display the ratings in a graph as shown below.
**The sample output as shown below.
Insert your rate (1 - 5)>> 2
Insert your rate (1 - 5)>> 4
Insert your rate (1 - 5)>> 2
Insert your rate (1 - 5)>> 1
Insert your rate (1 - 5)>> 1
Insert your rate (1 - 5)>> 3
Insert your rate (1 - 5)>> 1
Insert your rate (1 - 5)>> 1
Insert your rate (1 - 5)>> 2
Insert your rate (1 - 5)>> 5
Rating Graph
--------------------------
1: ****
2: ***
3: *
4: *
5: *
5. Write a loop that counts how many elements in array below are equal to one.
counting [ ] = {2, 4, 4, 1, 0, 9, 1};
6. Write a program that copy the array below into array called copied.
original [ ] = { ‘P’, ‘E’, ‘Y’, ‘R’};
7. Draw the table for the following array.
a) int cube [ 2 ] [ 4 ] = {4, 8, 12, 16, 20, 24, 28, 32};
b) int exam [ 3 ] [ 3 ] = {{45, 56, 78}, {69, 48}, {94}};
8. By using two-dimensional array and for loop, write a program that will produce below output.
Hint: use formula to check even number.
1212
2121
1212
2121