Yabasic - Examples

Examples

The classic Hello World program looks like this in Yabasic,

print "Hello World"

The following example will calculate prime numbers,

print "This program will calculate the prime numbers below the limit" input "limit: " limit n=2 do for i=2 to sqrt(n) if (frac(n/i)=0) then notprime=1 break endif next i if notprime<>1 then print n endif notprime=0 n=n+1 if n>limit break loop

Read more about this topic:  Yabasic

Famous quotes containing the word examples:

    No rules exist, and examples are simply life-savers answering the appeals of rules making vain attempts to exist.
    André Breton (1896–1966)

    It is hardly to be believed how spiritual reflections when mixed with a little physics can hold people’s attention and give them a livelier idea of God than do the often ill-applied examples of his wrath.
    —G.C. (Georg Christoph)

    There are many examples of women that have excelled in learning, and even in war, but this is no reason we should bring ‘em all up to Latin and Greek or else military discipline, instead of needle-work and housewifry.
    Bernard Mandeville (1670–1733)