Answer to Question #191097 in C++ for python

Question #191097

Take a number from user and make a multiplication table of that number till 10

using do while loop.




1
Expert's answer
2021-05-09T14:44:17-0400
#include<iostream>
using namespace std;
void Compute_table(int n)
{
    int i=1;
    do
    {
        cout<<"\n"<<n<<" X "<<i<<" = "<<n*i;
        i++;
    }
    while(i<=10);
}
int main()
{
    int n;
    cout<<"Enter a number : ";
    cin>>n;
    Compute_table(n);
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment