Answer to Question #181337 in C++ for Nick

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.


1
Expert's answer
2021-04-14T16:11:07-0400
#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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS