table using whlie loop and function
see screenshot must
code
--------------------------------------------------------------------------
#include<iostream>
using namespace std;
void while_table(int x,int y)
{int z = 0;
while (z < y)
{
cout << x << "X" << ++z << "=" << x * z << endl;
}
}
void main()
{
int x, y;
cout << "enter your table number=";
cin >> x;
cout << "Enter table limit=";
cin >> y;
while_table(x,y);
}
---------------------------------------------------------------------------------------------------
0 Comments