CFanatic

Go Back   CFanatic > Programming > C Programming

table of 2 in c programming topic posted under C Programming which is a part of Programming category in CFanatic Forum
Reply
 
Thread Tools Display Modes
  #1  
Old 03-16-2011, 01:28 AM
Junior Member
 
Join Date: Mar 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
suraksha is on a distinguished road
| More
table of 2 in c programming

how can i make table of 2 in c language
Reply With Quote
  #2  
Old 04-10-2011, 01:18 AM
Ann_beginner's Avatar
Junior Member
 
Join Date: Apr 2011
Posts: 9
Thanks: 2
Thanked 2 Times in 1 Post
Ann_beginner is on a distinguished road
| More
Re: table of 2 in c programming

Quote:
Originally Posted by suraksha View Post
how can i make table of 2 in c language
/* with this code you can hav table of any number you wish*/
Code:
#include<stdio.h>
#include<conio.h>

void main()
{
	int num,i;
	clrscr();

	printf("\nENTER THE NUMBER OF WHICH TABLE IS TO BE PRINTED : ");
	scanf("%d",&num);

	for(i=1;i<11;i++)
	{
		printf("\n%d x %2d = %2d",num,i,(num*i));
	}
	getch();
}

Last edited by shabbir; 04-10-2011 at 01:58 AM. Reason: Code Blocks
Reply With Quote
The Following 2 Users Say Thank You to Ann_beginner For This Useful Post:
rehaman_1 (05-21-2012), shabbir (04-10-2011)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Table kapilmishra16 C Programming 6 11-30-2010 11:38 PM
Adding Buttons to ASP Table rows in c#/ASP.NET croker10 C# Programming 0 09-02-2010 11:23 AM
C program to construct a divided difference table newton_LA C Programming 0 08-28-2010 04:11 AM
Variable arguments to lookup table function pointers ftl25 C++ Programming 0 08-28-2010 04:11 AM
C program to construct a divided difference table newton_LA C Programming 0 08-28-2010 04:11 AM



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO ©2010, Crawlability, Inc.