বুধবার, ৩ ফেব্রুয়ারী, ২০১৬

Get the lenght of number/character without using header file by c++

#include<iostream>
using namespace std;

int main()
{
    int i = 0,  degit = 0;
    char string[80];
    cout << "enter the number/character : ";
    cin >> string;
    while((string[i++]) != '\0')
            ++degit;
    cout << "The length of string is : " << degit << endl;

   return 0;
}





///ahmed shuvo969

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন