/*
Write a void function with an input string s and it should return the 
lowercase version of s and the uppercase version of s. 
Write also a driver program.
*/

#include <iostream>
#include <string>
using namespace std;
void upper_lower(string s, string& lower, string& upper);
int main()
{
	string s, l, u;
	cout << "Enter a string: " << endl;
	
	// Read the string
	getline(cin,s);
	
	// Call the function.
	upper_lower(s,l,u);

	// Print the values returned
	cout << "Lowercase: " << l << endl;
		cout << "Uppercase: " << u << endl;
	return 0;
}

void upper_lower(string s, string& lower, string& upper)
{
	int i;
	// Initialize lower and upper
	lower = s;
	upper = s;
	for (i = 0; i < s.size(); i++)
	{
		/*Convert the character of s at position i to lowercase*/
		lower[i] = tolower(s[i]);

		/*Convert the character of s at position i to uppercase*/
		upper[i] = toupper(s[i]);
	}	

}



