Hi, Please help me with C code to find the number entered is integer or float????? Thanks in advence.
First of all have you decided how to determine whether a number is integer or float? If you haven't done this yet then you won't be able to write a program to do it. If you've decided that, have you started yet? What code do you have? Does it work? If not, what does it do wrong? What input did you give and what output did you get?
hi Dear, Please try this code easy and simple.... Code: #include <stdio.h> #include <conio.h> void main() { float f; int i; printf("Enter a number : "); scanf("%f",&f); i=f; if(i==f) printf("\nYou have Enterd an Intiger number"); else printf("\nYou have Enterd a float number"); getch(); }