To find the given no. is perfect square (or) not

Program:

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
    int m, n;
    float p;
    clrscr();
    printf("Enter a number : ");
    scanf("%d", &n);
    p = sqrt(n);
    m = p;
    if (p == m)
    printf("\n%d is a perfect square", n);
    else
    printf("\n%d is not a perfect square", n);
    getch();
}

Output:

Case: 1

Enter a number : 81
81 is a perfect square

Case: 2

Enter a number : 12
12 is not a perfect square