কম্পিউটার টিউটোরিয়াল

C++ STL-এ lldiv() ফাংশন: ভাগফল এবং বাকি পাওয়া

C++ STL-এ lldiv() ফাংশন দুটি সংখ্যার ভাগফল (quotient) এবং বাকি (remainder) রিটার্ন করে।

অ্যালগরিদম

Begin
    দুটি long টাইপের নম্বর ইনপুট নিন।
    lldiv() ফাংশন কল করুন।
    ভাগফল এবং বাকি প্রিন্ট করুন।
End.

উদাহরণ কোড

#include <cstdlib>
#include <iostream>
using namespace std;

int main() {
    long long q = 500LL;
    long long r = 25LL;
    lldiv_t res = lldiv(q, r);
    cout << "Quotient of " << q << "/" << r << " = " << res.quot << endl;
    cout << "Remainder of " << r << "/" << r << " = " << res.rem << endl;
    return 0;
}

আউটপুট

Quotient of 500/25 = 20
Remainder of 25/25 = 0
  1. C++ STL-এ tanh() ফাংশন

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

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

  4. C++ STL-এ sinh() ফাংশন