Header Ads

  • Breaking News

    Display Multiplication table up to 10 of the no. entered by the user



    In C++ Language we write the code in the following format

    #include <iostream>
     using namespace std;
     int main()
    {
     int n;
     cout << "Enter a positive integer: ";
     cin >> n;
    for (int i = 1; i <= 10; ++i)

    { cout << n << " * " << i << " = " << n * i << endl; } 
    return 0;
    }

    Hence the Result is


















    No comments

    Post Top Ad

    Post Bottom Ad