If you declared column_number as a int and then you are reading the user input with something like scanf("%d", &column_number); what will happen basically if the user enter something like 2.4, is that scanf will read and store the value 2 in column_number. This is how works scanf for integer, it reads the keyboard buffer for numeric character until it read a non-numeric character (approximately).
There would be different way to do so if the user enter something like 2.4. Like reading the user input in a buffer with fgets, than reading the buffer for an int with sscanf and reading again the buffer with sscanf for a float, then casting the int value to the float and checking if the comparaison is true; in that case, you could assume that the user enter a "real" integer.
I think that would work (but i have not tested).
(Edit: i just tested it and it does work. Here's my test program heh)
Code:
#include <stdio.h>
#define TAILLE 50
int main()
{
char chaine[TAILLE];
int i;
int entier;
float flottant;
printf("Enter a number: ");
fgets(chaine, TAILLE, stdin);
i = sscanf(chaine, "%d", &entier);
if (i != 0)
{
sscanf(chaine, "%f", &flottant);
if ((float) entier == flottant)
{
printf("Integer number.\n");
}
else
{
printf("Decimal number.\n");
}
}
else
{
printf("That's not even a number, moron.\n");
}
getchar();
return 0;
}