I have a triangle program in c
#include // A function which decides the type of the triangle and prints it void checkTriangle(int s1, int s
%d accepts only integer. try with %x in scanf() for hex-decimal input.
%d
%x
Better you can get input as string then check using isnumeric() else use scanf("%[^\n]s", word) like @mou suggested.
isnumeric()
scanf("%[^\n]s", word)