| | |
pls help me....!!!
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
i have to make one prg in c
that accept only odd number (no) which is (4>no>30) & have to
genrate the pertern which is given below
when no=7 then given petern should be genrated
for that i have do some coding but i can't get the exatly petern..
pls help to solve this problem
thanx in advance .....
that accept only odd number (no) which is (4>no>30) & have to
genrate the pertern which is given below
when no=7 then given petern should be genrated
for that i have do some coding but i can't get the exatly petern..
pls help to solve this problem
thanx in advance .....
c Syntax (Toggle Plain Text)
#include<stdio.h> #include<conio.h> void main() { int no,i,j,no1; clrscr(); printf("Enter Number Of Lines: "); scanf("%d",&no); no1=no/2; for(i=1;i<=no1;i++) { for(j=i;j<no;j++) printf(" "); for(j=1;j<=i;j++) { if(j==1 || j==i) printf("* "); else printf(" "); } printf("\n"); } for(i=1;i<=no*2-1;i++) printf("*"); for(i=1;i<=no;i++) { if(i%2==0) { for(j=1;j<=i;j++) { //printf("*"); } } else printf("\n"); } for(i=1;i<=no*2-1;i++) printf("*"); printf("\n"); for(i=no1;i>0;i--) { for(j=i;j<no;j++) printf(" "); for(j=1;j<=i;j++) { if(j==1 || j==i) printf("* "); else printf(" "); } printf("\n"); } getch(); }
Last edited by nitu_thakkar; Mar 12th, 2009 at 1:31 pm. Reason: pertern wes not proper formated
@monkey_king
( thnax for ur reply )
my pertern should be look like when i give
no=7
then out put is look like
http://img353.imageshack.us/img353/8527/starj.jpg
( thnax for ur reply )
my pertern should be look like when i give
no=7
then out put is look like
http://img353.imageshack.us/img353/8527/starj.jpg
Last edited by nitu_thakkar; Mar 15th, 2009 at 2:23 pm.
![]() |
Similar Threads
- windows xp installation error!! pls help! (Troubleshooting Dead Machines)
- Help me remove Online Poker Pop up pls (Viruses, Spyware and other Nasties)
- hi friends pls help me out (C++)
- pls.help me im begging you!!! (C)
- pls... i need help!!! (C)
- Pls Hlp me with Hijackthis log file. (Viruses, Spyware and other Nasties)
- Pls help with my HJT log (Viruses, Spyware and other Nasties)
- can somebody pls. help me out with my HJT log.. (Viruses, Spyware and other Nasties)
Other Threads in the C Forum
- Previous Thread: Help needed!!!
- Next Thread: Problems reading multible words from a line of a file
Views: 342 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for C
#include * append array arrays bash binarysearch changingto char character cm copyanyfile copypdffile createprocess() database directory drawing dynamic execv feet fgets file floatingpointvalidation fork framework function functions getlogicaldrivestrin givemetehcodez global grade graphics gtkwinlinux histogram homework i/o ide include infiniteloop initialization input interest intmain() iso keyboard kilometer lazy license linked linkedlist linux list looping loopinsideloop. lowest matrix meter microsoft mqqueue mysql oddnumber odf open openwebfoundation overwrite pause pdf pointer pointers posix power process program programming pyramidusingturboccodes read recursion recv recvblocked reversing segmentationfault single socket socketprogramming spoonfeeding standard strchr string student suggestions system test testing threads unix urboc user whythiscodecausesegmentationfault win32api windowsapi





