Qbasicnews.com
Floyd's traingle - Printable Version

+- Qbasicnews.com (http://qbasicnews.com/newforum)
+-- Forum: QBasic (http://qbasicnews.com/newforum/forum-4.html)
+--- Forum: QB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-11.html)
+--- Thread: Floyd's traingle (/thread-9010.html)

Pages: 1 2


Floyd's traingle - spidy - 03-10-2006

can any one tell me how to print this traingle

1
2 3
4 5 6
7 8 9 10
11.....14 15
. .
.
.
79.....................................91


Floyd's traingle - axipher - 03-11-2006

Here's something I just whipped up:

Code:
dim as integer linenumber = 1,number = 1
for count = 1 to 20
    for count2 = 1 to linenumber
        print number;
    number += 1
    next
    print ""
    linenumber += 1
next
sleep



Floyd's traingle - red_Marvin - 03-11-2006

---Homework alert---


Floyd's traingle - axipher - 03-11-2006

Quote:---Homework alert---

I felt a need to post this as homework for myself, I'm in Grade 11 Math and we recently did number sequences and a similar problem arose, I made a program to solve it by using the formula, but never thought of doing a graphical representation of it, this helped me alot.


Floyd's traingle - Agamemnus - 03-11-2006

This is not QB. Banned. 8)

Seriously now, we have at least two infractures now, made by you and cha0s and probably loads of others. I am beginning to think the coming consolidation will be chaos, which is possibly why the dancing sumo wrestler in a tutu is holding off on it.

Sorry for the thread hijack; just felt this needed saying.


Floyd's traingle - spidy - 03-11-2006

Quote:Here's something I just whipped up:

Code:
dim as integer linenumber = 1,number = 1
for count = 1 to 20
    for count2 = 1 to linenumber
        print number;
    number += 1
    next
    print ""
    linenumber += 1
next
sleep

hi

its not working. it shows the msg "Expected:SHARED"
can u do it again


Floyd's traingle - Z!re - 03-11-2006

Quote:hi

its not working. it shows the msg "Expected:SHARED"
can u do it again
No, he cant. Listen to your teacher.


Floyd's traingle - spidy - 03-11-2006

how to print this traingle

1
0 1
1 0 1
0 1 0 1
1 0 1 0 1


Floyd's traingle - RyanKelly - 03-11-2006

Quote:how to print this traingle

1
0 1
1 0 1
0 1 0 1
1 0 1 0 1

Questions of this sort are not specific enough. The purpose of homework questions of this nature is to foster problem solving skills. Find the pattern essential to the output you are looking for, then use the programming techniques you've learned in class to replicate it. It does us no good to help you pretend to know what you're doing.


Floyd's traingle - axipher - 03-11-2006

I have some QB compadible code, I've been using FB so long i forgot QB is pretty primitive compared to FB. I'm not going to post the code since the others don't want me to.