If the first letter of the group you are examining is lowercase, you should remove the next three letters and they should be converted to uppercase before printing. and vice versa.
If the first letter of the group is uppercase, you should remove the next five letters and they should be converted to lowercase.
I have a start but its not much, im confused as to how I examine all the different parts of the string and determine if the character is upper or lowercase
Heres my code thus far:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace StringManip
{
class strings
{
static void Main()
{
string word = "SUPERcalAFRAGiliSTICExpeALLEDocious";
string group;
for (int pos = 0; pos < word.Length; pos++)
{
if (word == word.IsLower())
{
group = word.Substring(word[pos], 4);
Console.WriteLine(group);
}
else
{
group = word.Substring(word[pos], 2);
Console.WriteLine(group);
}
}
}
}
}

New Topic/Question
Reply



MultiQuote







|