Table printing of a number using user defined functions
Table printing of a number using user defined functions code:
//User-defined function to print Table of a number
#include<iostream>
using namespace std;
void table(int y);
void main()
{
int a;
cout<<"Enter the number for Table"<<endl;
cin>>a;
table(a);
}
void table(int y)
{
for(int i=1;i<=10;i++)
{
cout<<y<<" * "<<i<<" = "<< y*i<<endl;
}
}
Download:
To download this code click on the given link below:
Comments
Post a Comment