Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 23-01-2008, 12:49 PM   #1 (permalink)
Not fresh
 
VINSTAR's Avatar
 
Join Date: Aug 2007
Location: Adoor/Kerala/INDIA
Posts: 79
Default need c program


i need c program for the following questions

Generate the following pattern using nested loops:

1

23

345

4567

56789

678901

7890123

89012345

901234567



Generate the following pyramid of digits using nested loops

. 1
.
. 2 3 2
.
. 3 4 5 4 3
.
. 4 5 6 7 6 5 4
.
. 5 6 7 8 9 8 7 6 5
.
. 6 7 8 9 0 1 0 9 8 7 6
.
. 7 8 9 0 1 2 3 2 1 0 9 8 7
.
. 8 9 0 1 2 3 4 5 4 3 2 1 0 9 8
.
. 9 0 1 2 3 4 5 6 7 6 5 4 3 2 1 0 9
.
. 0 1 2 3 4 5 6 7 8 9 8 7 6 5 4 3 2 1 0
__________________
gudz.org
VINSTAR is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 23-01-2008, 02:21 PM   #2 (permalink)
Fresh Stock Since 2005
 
Join Date: Feb 2005
Posts: 1,015
Default Re: need c program

Do your Homework yourself dude..
__________________
http://www.khattam.info
khattam_ is offline  
Old 23-01-2008, 07:42 PM   #3 (permalink)
Right Off the Assembly Line
 
Join Date: Jan 2008
Posts: 5
Default Re: need c program

#include<stdio.h>
#include<conio.h>
main()
{int i,j;
for(i=1;i<=10;i++)
{for(j=i;j<=2*i-1;j++)
printf("%d ",j%10);
for(j-=2;j>=i;j--)
printf("%d ",j%10);
printf("\n");
}
getch();
return 0;
}

#include<stdio.h>
#include<conio.h>
main()
{int i,j;
for(i=0;i<9;i++)
{for(j=i+1;j<=2*i+1;j++)
printf("%d ",j%10);
printf("\n");
}
getch();
return 0;
}
//this's for da 1st 1 ... the above 1's 4 da second!.. try doin ur home work yourself!!!

Last edited by maddy_35420; 23-01-2008 at 07:43 PM. Reason: Automerged Doublepost
maddy_35420 is offline  
Old 30-01-2008, 04:32 PM   #4 (permalink)
Not fresh
 
VINSTAR's Avatar
 
Join Date: Aug 2007
Location: Adoor/Kerala/INDIA
Posts: 79
Default Re: need c program

thanx ,maddy
__________________
gudz.org
VINSTAR is offline  
Closed Thread

Bookmarks

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
program? rounit Software Q&A 6 10-04-2007 10:54 PM
How to use a FTP program? Anindya Software Q&A 1 22-03-2007 12:52 AM
a c program.. how to do it??? anubhav_har QnA (read only) 4 21-09-2005 11:54 AM
new program in 'close program menu' list and more....... vishakadatta QnA (read only) 2 12-04-2005 11:33 PM
C++ Program Q. shwetanshu Programming 5 09-02-2005 01:50 PM

 
Latest Threads
- by Charan
- by Sarath
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 12:48 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2