Question 6:
(1 mark, file to be edited: Q6.c)
The program allows users to enter up to 100 characters from the keyboard.
Find and print the sum of the values of numeric characters (0-9) that are even numbers.
Below is an example:
Enter s = "He3llo2 everyone4!"
He311o2 everyone4!
OUTPUT:
6
Press any key to continue
Question 7:
(1 mark, file to be edited: Q7.c)
The program allows the user to enter the values of the elements of the square matrix as integers with the same number of rows and columns and input from the keyboard.
Print the element on the main diagonal with the maximum value.
Below is an example:
When 'rows' = 3; array = {
Zoom
+ 100%
Close