Data_Structure_Array

S

shekh

#include<iostream.h>
#include<conio.h>
void main()
{
int num,a,i;
cout<<"Enter the number : ";
cin>>num;
cout<<"The table of that number is : ";
for(i=1;i<=num;i++)
{
a=i*num;
cout<<"\n"<<a<<"\n";
}
getch();
}
 
A

Alan Woodland

shekh said:
#include<iostream.h>
//for the 20th century
#include said:
#include<conio.h> Why? non-standard?
void main() int main
{
int num,a,i;
cout<<"Enter the number : ";
cin>>num;
cout<<"The table of that number is : ";
for(i=1;i<=num;i++)
Even in this example the lack of indentation makes it harder to read!
{
a=i*num;
cout<<"\n"<<a<<"\n";
}
getch(); getchar()?
}

What's the question?

Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,417
Latest member
DarrenGaun

Latest Threads

Top