Create a program using a one-dimensional array that accepts five input values from the keyboard. Then it should also accept a number to search. This number is to be searched if it is among the five input values. If it is found, display the message “Searched number is found!”, otherwise display “Search number is lost!”.
Sample input/output dialogue:
Enter five numbers:
10 15 20 7 8
Enter a number to search: 7
Search number is found!
Create a program using two-dimensional arrays that determines the highest and lowest of the 12 input values.
Sample input/output dialogue:
Enter twelve numbers:
13 15 20 13 35 40 16 18 20 18 20 14
highest: 40
lowest: 13
Create a program using two-dimensional arrays that computes the sum of data in rows and the sum of data in columns of the 3x3 (three by three) array variable n[3[3].
Sample input/output dialogue:
5 9 8 = 22
3 8 2 = 13
4 3 9 = 16
---------------------
12 20 19
Create a program using a one-dimensional array that determines the highest value among the five input values from the keyboard and prints the difference of each value from the highest.
Create a program using two-dimensional arrays that determines the even numbers among the twelve input values from the keyboard and prints the list of these Even numbers.
Note:
3 rows, 4 columns
A company wants to transmit data over the telephone, but it is concerned that its phones may be tapped. All of its data is transmitted as four-digit integers. It has asked you to write a program that will encrypt its data so that the data may be transmitted more securely. Your program should read a four-digit integer entered by the user in a prompt dialog and encrypt it as follow: Replace each digit by (the sum of that digit plus 7) modulus 10. Then swap the first digit with the third, and swap the second digit with the fourth. Then display the encrypted integer.
I.2 (10 points)
Write a program to decrypt the encrypted data.
A company wants to transmit data over the telephone, but it is concerned that its phones may be tapped. All of its data is transmitted as four-digit integers. It has asked you to write a program that will encrypt its data so that the data may be transmitted more securely. Your program should read a four-digit integer entered by the user in a prompt dialog and encrypt it as follow: Replace each digit by (the sum of that digit plus 7) modulus 10. Then swap the first digit with the third, and swap the second digit with the fourth. Then display the encrypted integer. Write a program to decrypt the encrypted data.