Answer to Question #18815 in C++ for mat

Question #18815
I want to create a table of multiplication of entered number using function() property in c++.i hv created the code for this but it is not working.Below is the trial code made by me. #include<iostream.h> #include<conio.h> void main() int multiply(a) { int i; for(i=0;i<11;i++) { a*=i; return a; } } int main(); { int i,x; clrscr(); cout<<"enter the nuber whose table is to be shown"; cin>>x; for(i=0;i<11;i++) { cout<<multiply(a); return 0; } getch(); }_
Expert's answer

#include <iostream>
#include <conio.h>
using namespace std;


void multiply(int a){
for(int i=1; i < 10; i++)
cout<<a*i<<" ";
cout<<endl;
}

int main()

{
int x;
cout<<"enter the nuber whose table is to be shown: ";
cin>>x;
multiply(x);
}

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 first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS
paypal