ok, once again, I'm back...after this program I don't plan to write anymore...here's the task...
Program # 1: Write a program that can decrypt the following string
Each character must be decrypted by applying the decryption algorithm to its ASCII
value. The decryption algorithm is:
• if array index is even, subtract 1
• if array index is odd, subtract 3
That is, the first character has an array index of 0, which is considered even, so subtract
1 from its ASCII value to produce the new ASCII value. The second character has an
array index of 1, which is odd, so subtract 3 from its ASCII value to produce the new
ASCII value. Repeat for all characters.
Example: The encrypted string
can be decrypted to produce
1. In main(), declare an array of chars for storing the encrypted string.
2. Write a function that will be passed this array of chars, which it then processes character by character, printing out each decrypted character as it is determined. The declaration will look like this:
void decrypt(char input);
3. Don’t calculate the length of the array. Instead, look for the terminating null that is at the end of each string.
4. Don’t hard-code any ASCII values (or their character equivalents) in your program; it’s unnecessary.
5. If you do the math correctly to produce the decrypted ASCII values, then they will be in the range that is valid for ASCII characters.
Program # 2: Write a program that can find the maximum even and odd numbers in the following two series:
4, 9, 2, 8, 7, 13, 2, 5
14, 19, 3, 12, 20, 8, 20, 7, 17, 9
• Store each series of numbers in its own array in the original order in main().
• In main(), you will also declare two variables of type int for storing the maximum even and odd values.
• Write a single function for determining the maximum even and odd values of a 1D array. The function declaration will be
void largest(int data, int size, int* ptrEven, int* ptrOdd);
where size is the size of the array to be processed, ptrEven is the pointer to the variable
in main() for storing the maximum even value, and ptrOdd is the pointer to the variable
in main() for storing the maximum odd value.
• Don’t hard-code values in your function specific to either array. Instead, the function
should be able to process either of these arrays or any other 1D array of ints.
• In main(), call largest() for the first array and after largest() has completed its work,
from main() print the maximum even and odd values from the sequence. Repeat this
process for the second array.
• You can assume that the array values will be greater than or equal to zero.
can someone please...I thought I was completely lost on the first 3, this one has me stumped, I'm not even sure where to begin