Wart.cpp
string Wart::unjumble(string input, int width)
{
	string decode = "";
	int length = input.length();

	int height = ceil(length/width);
	
	//just like encode, but switches the array indeces
	for (int i = 0; i < height; i++)
	{
		for (int k = 0; k < width; k++)
		{
			decode += input[i + height*k];
		}
	}
	return decode;
}
//this is the method that does the actual decoding. works exactly opposite of the encode function
this is the method that does the actual decoding. works exactly opposite of the encode function
this is the method that does the actual decoding . works exactly opposite of the encode function
string Wart::unjumble(string input, int width)
{
	string decode = "";
	int length = input.length();
	int height = ceil(length/width);
	for (int i = 0; i < height; i++)
	{
		for (int k = 0; k < width; k++)
		{
			decode += input[i + height*k];
		}
	}
	return decode;
}
string Wart :: unjumble ( string input , int width ) { string decode = " " ; int length = input . length ( ) ; int height = ceil ( length / width ) ; for ( int i = 0 ; i < height ; i ++ ) { for ( int k = 0 ; k < width ; k ++ ) { decode += input [ i + height * k ] ; } } return decode ; }
this is the method that does the actual decoding.
this is the method that does the actual decoding .
//just like encode, but switches the array indeces