A switch would be cleaner. The minimum necessary to fix your code would be to surround c, r, and t in your if statements with single apostrophes.
As it is, you're attempting to compare the input to variables named c, r, and t. You want to compare it to the literal characters c, r, and t. The syntax for a literal character is to surround it with single apostrophes, like 'c'.
Alternately, you could compare the input to the variables you have declared (circle, rectangle, triangle). If you do that, you don't want to surround the variable name with any kind of quotes whatsoever.
And indent your code. Really. It makes finding simple errors (things like missing end braces) much easier to find, and can help you make sure you know what you're doing when tracking down logic issues at all. I know it probably seems silly right now. But, as an example:
Code:
if( a )
{
if( b )
{
if( c )
{
if( d )
{
if( e )
{
if( f )
{
}
}
}
}
}
isn't obvious. On the other hand,
Code:
if( a )
{
if( b )
{
if( c )
{
if( d )
{
if( e )
{
if( f )
{
}
}
}
}
}
Has an obvious missing end brace. If the lack of indention was because you re-typed your code instead of cut-n-paste, I apologize.