All pastes #716832 Raw Edit

Yay

public cpp v1 · immutable
#716832 ·published 2007-09-27 05:04 UTC
rendered paste body
/*Title: Name FixerAuthor: Vanessa SchagererDate: 9/20/07Description: Takes user input name and changes it to be written correctly			with only the first letter capitalized and the rest lower case.*/#include <iostream>using namespace std;int main(){	char ch, cont = 'y';	while(cont == 'Y' || cont == 'y')	{		cout << "Please enter your name: \n";		cin.get(ch);		if('a' <= ch && ch <= 'z')		{			ch = ch - ('a' - 'A');		}		cout << ch;		cin.get(ch);				while(ch != ' ')		{			if('A' <= ch && ch <= 'Z')			{				ch = ch + ('a' - 'A');			}			cout << ch;			cin.get(ch);		}		cout << ' ';		cin.get(ch);		if('a' <= ch && ch <= 'z')		{			ch = ch - ('a' - 'A');		}		cout << ch;		cin.get(ch);		while(ch != '\n')		{			if('A' <= ch && ch <= 'Z')			{				ch = ch + ('a' - 'A');			}			cout << ch;			cin.get(ch);		}		cout << '\n';		cout << "Would you like to enter another name? (Y/N) ";		cin >> cont;		cin.get(ch);	}		return 0;}