I need to create a program for my friend that accepts a string from the user (not from the command line) and displays:

-The string using upper-case letters, e.g. all lower-case letters are converted to upper-case letters

-The string using lower-case letters, e.g. all upper-case letters are converted to lower-case letter.

-The string where the first letter of each word is upper-case and all other letters in the word are lower-case.

-The string in "camel case", i.e. the first letter in the string is lower case, followed by alternating upper and lower case letters.

-And that's it :P

Here’s what I have so far, I'm completely lost now :*( if anyone could help me finish this I'd greatly appreciate it. )) also I don't want to use string commands, too easy :P I figured I'd post the entire working code so you can see what’s wrong. I've been trying to get Lower case to work, but every way I use it, it just messes up the rest of them. I want it to display the sentence you entered, then in lowercase, then in uppercase, then in first case, then in camel case. I got the sentence, upper and first case to work. The other two I can’t. Please see if you can fix it, I feel retarded lol....

Code:
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

void toUpper(char *str);
void toFirstCap(char *str);
void toCamelCase(char *str);

int main(int argc, char **argv)
{ 
char sentence[256]; 
char ch; int i = 0;
printf("Enter a string: ");
gets(sentence);
printf("\nYour Sentence:%s\n",sentence);
toUpper(sentence);
printf("\nUpper case: %s\n",sentence);
toFirstCap(sentence);
printf("\nFirstCap case: %s\n",sentence);
toFirstCap(sentence);
system("pause");}

void toUpper(char *str){
while(*str != '\0'){
if(*str >= 'a' && *str <= 'z')
{ *str -= 'd' - 'D';
} str++; }}

void chngCaseSingleCharacter(char *str, int cAse){
if(cAse == 2)
{ 
if(*str >= 'a' && *str <= 'z'){
*str -= 'd' - 'D';}
else if(cAse == 1){
if(*str >= 'A' && *str <= 'Z'){ 
*str += 'd' - 'D';
}}}}

void toFirstCap(char *str){
char b;
while( (b = *str++) != '\0'){ 
if(b == ' ' || b == '\t'){
if(*str >= 'a' && *str <= 'z')
{ *str -= 'd' - 'D'; }} 
else{
if(*str >= 'A' && *str <= 'Z') {
*str += 'd' - 'D'; }}}}

void toFirstCapSmartWay(char *str){
char b; while( (b = *str++) != '\0') 
{ if(b == ' ' || b == '\t') {
chngCaseSingleCharacter(str, 2);}
else {
chngCaseSingleCharacter(str, 1);
}}}

//void toCamelCase(char *str)
//put code 4 camel case here//