কম্পিউটার

C++ STL-এ iswalpha() ফাংশন


C++ STL-এ iswalpha() ফাংশনটি প্রদত্ত প্রশস্ত অক্ষরটি একটি বর্ণমালা কিনা তা পরীক্ষা করতে ব্যবহৃত হয়।

অ্যালগরিদম

Begin
   Initializes the strings.
   Call function iswalpha(str) to check whether it contains alphabet or not.
   If it contains alphabet, then value will be returned otherwise zero will be returned.
End

উদাহরণ কোড

#include <cwctype>
#include <iostream>
#include <cwchar>
#include <clocale>
using namespace std;
int main() {
   setlocale(LC_ALL, "ab1234");
   wchar_t s[] = L"a%$^^&)";
   bool flag = 0;
   for (int i=0; i<wcslen(s); i++) {
      if (iswalpha(s[i])) {
         flag = 1;
         break;
      }
   }
   if (flag)
      wcout << s << L" contains alphabets";
   else
      wcout << s << L" doesn't contain alphabets";
   return 0;
}

আউটপুট

a%$^^&) contains alphabets

  1. C++ STL-এ tanh() ফাংশন

  2. C++ STL-এ atanh() ফাংশন

  3. C++ STL-এ cosh() ফাংশন

  4. সি++ এসটিএল-এ sinh() ফাংশন