# Thread: Table for a number

1. Senior Member+
Last Online
5th October 2013 @ 10:03 PM
Join Date
09 Aug 2010
Location
Peshawar
Gender
Male
Posts
109
13
Credits
710
Thanked
2

## Table for a number

Code:
```#include<iostream>
using namespace std;
main()
{
int tab, res, i;
char ch;
do
{
cout<<"\n\n\tEnter any number : ";
cin>>tab;
cout<<"\n\tEnter how much do you want to create : ";
cin>>i;
cout<<endl;
for(int a=1;a<=i;a++)
{
res=tab*a;
cout<<"\t"<<a<<"\t"<<tab<<" * "<<a<<" = "<<res<<endl;
}
cout<<"\n\n\tNext (Y/N) : ";
cin>>ch;
}
while(ch=='y'||ch=='Y');
cout<<endl;
system("pause");
}```

2. thnxxxx

3. Member
Last Online
9th October 2013 @ 09:10 PM
Join Date
24 Apr 2013
Location
Universe
Age
23
Gender
Male
Posts
2,581
192
Thanked
259
Nice Sharing

4. اچھی پوسٹ ہےبھائی۔
نیسٹڈ لوپ کے بغیر کام چلانے ک لئے یہ کوڈ دیکھیں۔ اس پروگرام کو ٹربو معن چلائیں۔
#include<iostream.h>
#include<conio.h>
void main(){ // Made by Faheem Oct/26/2013
clrscr();
int s,e,result;
loop:
cout<<"\nEnter a number to find it's table : \t";
cin>>s;
cout<<"\nEnter the range of table in numbers : \t";
cin>>e;
for(int i=1;i<=e;i++){
result=i*s;
cout<<"\n\t"<<i<<":"<<"\t"<<s<<"*"<<i<<"\t"<<"="<< "\t"<<resul

t<<endl; }
char choice;
cout<<"\t\nContinue ? (Y/N)"<<"\t";
cin>>choice;
if(choice=='y'||choice=='Y') goto loop;
cout<<"\nPress any key to end this program . . .";
getch();
}

5. nyc work

6. AlOnEbOy said:
Code:
```#include<iostream>
using namespace std;
main()
{
int tab, res, i;
char ch;
do
{
cout<<"\n\n\tEnter any number : ";
cin>>tab;
cout<<"\n\tEnter how much do you want to create : ";
cin>>i;
cout<<endl;
for(int a=1;a<=i;a++)
{
res=tab*a;
cout<<"\t"<<a<<"\t"<<tab<<" * "<<a<<" = "<<res<<endl;
}
cout<<"\n\n\tNext (Y/N) : ";
cin>>ch;
}
while(ch=='y'||ch=='Y');
cout<<endl;
system("pause");
}```
#<stdio.h> is se kiya kro yar smajhny me asani hoti hai

7. Junior Member
Last Online
8th December 2013 @ 04:06 PM
Join Date
03 Dec 2013
Age
25
Gender
Male
Posts
4
0
Credits
694
Thanked
0
yar ye printf scanf me to kr do plzzzz

8. Nice post

9. nice

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•