Header Ads Widget

Ticker

6/recent/ticker-posts

Find That Number is Float Or Integer Using C++ Language - Digitalise Data

 

"Digitalise Data" , "C++ Programing"

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

Post a Comment

0 Comments