Searching...

Print Table of Given Number with given Length

15:41

// Get Length and Number from user to print table of given number up to given length
#include <iostream>
using namespace std;
int main()
{
int num,length;
cout << "Enter Number for the Table: ";
cin >> num;
cout << "Enter Length of the Table: ";
cin >> length;
for (int i=1;i<=length;i++)
cout << num << "*" << i << "=" << num*i <<endl;
return 0;
}

0 comments:

Post a Comment

Thanks For Your FeedBack....