problem 1: print the table of N.
Print the multiplication table of a given number N.
Example 1:
Input: N = 9 Output: 9 18 27 36 45 54 63 72 81 90
ANSWER:
vector<int> getTable(int N)
{
vector<int> vec;
for(int i=1;i<11;i++)
{
vec.push_back(N*i);
}
return vec;
}
Comments
Post a Comment