|
|
#2 (permalink) |
|
Staff
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2005
Posts: 5,866
Credits: 540,048
Thanks: 1,660
Thanked 2,115 Times in 734 Posts
|
omidvaram error nade, beharhal...
3 ta loop dari, yeki vase 5 rows, yeki vase empty spaces va yeki vase stars. har shape e dige khasti dorost koni, you need using nested loops. the first loop for your rows, then u can use the counter in each loop from the other looops within! huh? i cant explain any better lol just practice practice and u'll get it. start with simple shapes |
|
|
|
|
|
#4 (permalink) |
|
Forum Legend
![]() ![]() ![]() ![]() ![]() ![]() |
Java, but the are same principle for C or C++..
Search for for loop and check for syntax.. you must use 3 for loop, the first loop will run your code 5times.. nr 2. will write underscore 5times, and the next time well be one less, nr 3. the same as nr 2, just inverse , begin from 1 and go up to the 5 |
|
|
|
|
|
#5 (permalink) |
|
Staff
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2005
Posts: 5,866
Credits: 540,048
Thanks: 1,660
Thanked 2,115 Times in 734 Posts
|
haminja post bezani behtare, ham saritar javab mgiiri, ham javab bedarde baghiye ham mikhore. age soale dige bod man dige zzzzz hastam (3 a.m) amma bachehaye khebre ziad darim komaket mikonan, mesle hamin aghaye arian88
|
|
|
|
|
|
#6 (permalink) |
|
Forum Legend
![]() ![]() ![]() ![]() ![]() ![]() |
for loop yedonash kheyli khobeh bishar beshe kheyli sakht mishe...
makhsosan ke inja shoma bayad baraxesh koni va va va baraye hamin behtare ke hamash say koni man alan baraye neveshtane in code 10 min vaght gozashtam behtarin kar ham ine ke az medad va kaghaz estfadeh koni va logic baraye khodet entekhab koni, badesh hey benevisi toye computer bebini chekar bayad koni ke kar kone .... |
|
|
|
|
|
#7 (permalink) | ||||||||||||||||||
|
Lord
![]() ![]() |
bad man az DevC++ estefade mikonam. erreur mide
|
||||||||||||||||||
|
|
|
||||||||||||||||||
|
|
#8 (permalink) | ||||||||||||||||||
|
Forum Legend
![]() ![]() ![]() ![]() ![]() ![]() |
setareh? Mage soaleton ro javab nadadam? codi ke white_hat neveshte male C / C++ ast Codi ke man neveshtam male Java e... vali taghriban hamone... Age yek soale jadideh behtar tozih bedid |
||||||||||||||||||
|
|
|
||||||||||||||||||
|
|
#9 (permalink) | ||||||||||||||||||
|
Lord
![]() ![]() |
ino ke mizanam mige system undeclared vali system aslan Ivalue nist. faghat baraye inke safhe nare mizaramesh #include <stdio.h> int main() { int i, j, a, star = 1; for(i=5;i>=1;i--) for(j=1;j<=i;j++){ printf(" "); } for(a=1;a<=star;a++){ printf("*"); } printf("\n"); system("pause"); return 0; |
||||||||||||||||||
|
|
|
||||||||||||||||||
![]() |
|
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How-To Mips programing | jingle | General Help | 0 | 19-02-09 00:07 |