/* Spring 2023 - Lab8 - convertCase.c

	continuation of Lab 7
	This time, the program will consist of multiple files with each function
	from last week's lab in a separate file.
	1. printMenu.c
	2. convertCase.c
	3. printArray.c

	The students will also create a defs.h which will contain the other 
	#include statement(s), prototypes, and #define or constants.


*/


#include "defs.h"


/* ------------------------------------------------------------ */
/* converts the case of the characters in the array sent in 
   parameters:  the array 
	return:  none  
*/
void convertCase(char text[MAX_LINE][MAX_LINE_LEN]) {
	for (int i = 0; i < MAX_LINE; i++ ) {
		for (int j = 0; j < MAX_LINE_LEN; j++) {
			if (text[i][j] < 91 && text[i][j] > 64)
				text[i][j] += 32;
			else if (text[i][j] < 123 && text[i][j] > 96)
				text[i][j] -= 32;
		}
	} 
}
/* ------------------------------------------------------------ */

