Saturday 12 January 2019

Table by Using Void



Table by Using Void:

#include <iostream>
using namespace std;

    void Table(int number, int range)
    {
        int x;
        cout<<"Enter the Range: ";
        cin>>x;
        for(int i=1;i<=x;i++)
    {
        cout<<number;
        cout<<"x";
        cout<<i;
        cout<<"=";
        cout<<number*i;
        cout<<endl;
    }
    }
    int main(){
   Table(12,15 );
   return 0;
    }

No comments:

Post a Comment