adsense

Hii, welcome to my site. My name is Om prakash kartik. This blog helps you to learn programming languages concepts.

Program in C++ to print table 1 to any number using Function

Program in C++ to print table 1 to any number using Function

#include<iostream>
#include<iomanip>
#include<conio.h>
 int Table(int x)
  {
   int i,j;
   for(i=1;i<=10;i++)
    {
     for(j=1;j<=x;j++)
      std::cout<<std::setw(4)<<i*j;
      std::cout<<std::endl;
    }
  }
 int main()
  {
   int n;
   std::cout<<" Enter a number:-";
    std::cin>>n;
 Table(n);
 getch();  
  }
Output:-






Post a Comment

0 Comments