I created a program that calculates Area of geometric shapes. At the beginning it asks user to enter a letter to select the shape for which he wants to calculate the area. Letters don't work I don't know why so I use numbers instead. Can anyone help me with that?
int letter;
printf("1 for triangle\n2 for square\n3 for rectangle: ");
scanf("%d", &letter);
if (letter == 1)
...
I want it to be like t
for triangle, s
for square and so on.