2. Encrypt Me Make a function that would generate a string of code based on the values of the array inputted by the user. 1. Make a main function that would declare an integer array and a character array of the same size. The size of the arrays as well as the elements of the integer array would come from the user. Ask the user to input the elements of the integer array. 2. Make a function that would accept both arrays and the size. The function would generate an equivalent character for each element of the integer array and store it in the character array. -if element <= 5 and positive: generate character 'l' -if element <=10 and >5: generate character 'a' -if element <=15 and >10: generate character 't' -if element <=20 and >15: generate character 'e' -if element >20: generate character 'r' -if element is negative: generate character '.' Input 1. Size of the Array 2. Elements of the Integer Array Output Input Array Size: 6 Input Array Elements: 4 2 8 12 76 -2 Code generated: llatr.
2. Encrypt Me
Make a function that would generate a string of code based on the values of the array inputted by the user.
1. Make a main function that would declare an integer array and a character array of the same size. The size of the arrays as well as the elements of the integer array would come from the user. Ask the user to input the elements of the integer array.
2. Make a function that would accept both arrays and the size. The function would generate an equivalent character for each element of the integer array and store it in the character array.
-if element <= 5 and positive: generate character 'l'
-if element <=10 and >5: generate character 'a'
-if element <=15 and >10: generate character 't'
-if element <=20 and >15: generate character 'e'
-if element >20: generate character 'r'
-if element is negative: generate character '.'
Input
1. Size of the Array
2. Elements of the Integer Array
Output
Input Array Size: 6
Input Array Elements: 4
2
8
12
76
-2
Code generated: llatr.
C language. Please follow the given format.
Step by step
Solved in 2 steps