Question #181337

Write a program that takes a number from the user and pass that number to a user defined function. The function displays the table of that number.


Expert's answer

#include<iostream>
using namespace std;


    void displayTable(int res){
    
}
int main(){
    int num,i,res;
    cout<<"Enter the number: \n";
    cin>>num;
    for(int i=1;i<=10;i++){
       res= num*i;
       cout<<num<<"*"<<i<<"="<<res;
       cout<<endl;
    }
    displayTable(res);
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS