Go Back   Persianhub > Classifieds > I am Looking For ...

Reply
 
LinkBack Thread Tools
Old 12-10-09, 15:58   #1 (permalink)
Lord
 
persian_cutie's Avatar
 
Join Date: Sep 2005
Location: Canada
Posts: 365
Credits: 2,446
Thanks: 46
Thanked 17 Times in 14 Posts
Send a message via MSN to persian_cutie
Exclamation Any Programmer HELP

salaaaaaaammm
Ok i have to do this shape
Im pretty new in programming so bare with me
*
**
***
****
*****
and please explain the code too so if i want to do another shape, Ill be able to do it by myself .
thank you soooooooooooooo much
persian_cutie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-10-09, 16:01   #2 (permalink)
Lord
 
persian_cutie's Avatar
 
Join Date: Sep 2005
Location: Canada
Posts: 365
Credits: 2,446
Thanks: 46
Thanked 17 Times in 14 Posts
Send a message via MSN to persian_cutie
the shape is not like this its the reverse and the stars only.
P.S its programming in C
_____*
____**
___***
__****
_*****
persian_cutie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-10-09, 19:51   #3 (permalink)
Staff
 
white_hat's Avatar
 
Join Date: Jul 2005
Posts: 5,867
Credits: 540,115
Thanks: 1,660
Thanked 2,115 Times in 734 Posts
yek hamchin chizi vase avali amma c compiler nadaram betestam, fekr konam doroste. u get the idea with nested loops

ps. attach mikonam, dorost embedd nemishe code
Attached Files
File Type: txt triangle_a.txt (166 Bytes, 4 views)
white_hat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-10-09, 19:59   #4 (permalink)
Lord
 
persian_cutie's Avatar
 
Join Date: Sep 2005
Location: Canada
Posts: 365
Credits: 2,446
Thanks: 46
Thanked 17 Times in 14 Posts
Send a message via MSN to persian_cutie
in codi ke dadi mide in
*
**
***
****
*****
amma man bar aksesho mikham
_____*
____**
___***
__****
_*****
persian_cutie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-10-09, 22:00   #5 (permalink)
Emperor
 
informerinvan's Avatar
 
Join Date: Sep 2007
Location: OTT
Posts: 1,048
Credits: 548
Thanks: 394
Thanked 411 Times in 225 Posts
Send a message via Yahoo to informerinvan
Exclamation

#include<stdio.h>
void main()
{
int i,j,k;

for(i=1;i<=5;i++)
{

for(j=1;j<=i;j++){
for(k=5;k>0;k--){
printf(" ");
}
printf("*");
}

}
printf("\n");
}
try this i didn't check it, but think this works.
informerinvan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-10-09, 22:18   #6 (permalink)
Lord
 
persian_cutie's Avatar
 
Join Date: Sep 2005
Location: Canada
Posts: 365
Credits: 2,446
Thanks: 46
Thanked 17 Times in 14 Posts
Send a message via MSN to persian_cutie
it gives error but ill try to fix it. ye soal dige daram age zahmat nist. mishe tozih bedi in chi kar mikone.

int x,y,z
x=y=z=0; /*inja yani hamashoon = 0 ?*/
while(y==++z <5)
X += z++;
x,y,z har kodoomeshoon chi mide?
persian_cutie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-10-09, 22:29   #7 (permalink)
Emperor
 
informerinvan's Avatar
 
Join Date: Sep 2007
Location: OTT
Posts: 1,048
Credits: 548
Thanks: 394
Thanked 411 Times in 225 Posts
Send a message via Yahoo to informerinvan
Exclamation

#include<stdio.h>
void main()
{
int i,j,k;

for(i=1;i<=5;i++)
{

for(j=1;j<=i;j++){
for(k=5;k>0;k--){
printf(" ");
}
printf("*");
}

printf("\n");
}
informerinvan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-10-09, 22:33   #8 (permalink)
Emperor
 
informerinvan's Avatar
 
Join Date: Sep 2007
Location: OTT
Posts: 1,048
Credits: 548
Thanks: 394
Thanked 411 Times in 225 Posts
Send a message via Yahoo to informerinvan
Exclamation

Quote: Originally Posted by persian_cutie View Post
it gives error but ill try to fix it. ye soal dige daram age zahmat nist. mishe tozih bedi in chi kar mikone.

int x,y,z
x=y=z=0; /*inja yani hamashoon = 0 ?*/
printf("x= %d",", y= %d", " ,z= %d\n",x,y,z);
while(y==++z <5)
printf("x= %d",", y= %d", " ,z= %d\n",x,y,z);
X += z++;
printf("x= %d",", y= %d", " ,z= %d\n",x,y,z);
x,y,z har kodoomeshoon chi mide?
in line haro ezafeh kon value x,y,z hardafeh barat print mikoneh
informerinvan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-10-09, 22:34   #9 (permalink)
Emperor
 
informerinvan's Avatar
 
Join Date: Sep 2007
Location: OTT
Posts: 1,048
Credits: 548
Thanks: 394
Thanked 411 Times in 225 Posts
Send a message via Yahoo to informerinvan
Exclamation

in site kheili khob tozih dadeh http://blogs.msdn.com/lucabol/archiv...31/223580.aspx
informerinvan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 12-10-09, 22:43   #10 (permalink)
Lord
 
persian_cutie's Avatar
 
Join Date: Sep 2005
Location: Canada
Posts: 365
Credits: 2,446
Thanks: 46
Thanked 17 Times in 14 Posts
Send a message via MSN to persian_cutie
it gave me this lol
x= 4206601x= 4206601Press any key to continue . . .
persian_cutie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

  Persianhub > Classifieds > I am Looking For ...

Thread Tools

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
The Programmer and the Engineer curtains Off Topic / Free Talk (Published) 5 01-05-08 14:31


All times are GMT -5. The time now is 13:06.

RSS Feed w3-css w3-xhtml Join us in Facebook
Rules Terms of Services Policy Advertisement

Designed by LastBrush
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
2004 - 2009 © Persianhub Network