This Program Is Helps To Find Out Your Number Is Float Or Integer In C++ Language
-----------------------------------
#include <iostream.h> #include <conio.h> void main() { int nr = 0; char ch; cout << "Please enter a number: " << endl; cin >> nr; cin.get(ch); if(ch=='.') { cout << "The entered number is a float. " << endl; } else { cout << "The entered number is an integer. " << endl; } }
-----------------------------------
Run This Program Using Turbo C++ in Pc Or TurboCdroid in Android It Will Work
#DigitaliseData
#C++Programing
0 Comments