>implying /g/ can output a triangle like this with code.
>>52050063wget http://i.4cdn.org/g/1451062609822.png
mv 1451062609822.png output.png
what now, faggot
>>52050086
You just for rekt OP
>>52050086
>platform dependent
top kek
>>52050086
without internet access or relying on premade modules
>>52050099
>>52050098
>moving the goalposts
>>52050086wget http://i.4cdn.org/g/1451062609822.png -O output.png
fag
>>52050086
-O output.png, no mv needed
>>52050063main() {
//char c[3] = "\0\0\0";
const char a[8] = " *";
const char b[8] = " * *";
const char c[8] = " * * *";
const char d[8] = " * * * *";
const char e[1] = "\n";
_write(1,a,8);
_write(1,e,1);
_write(1,b,8);
_write(1,e,1);
_write(1,c,8);
_write(1,e,1);
_write(1,d,8);
_write(1,e,1);
return 0;
}
Who's >implying now, huh?
>>52050063
just use decreasing amounts of spacing in a for-loop, or just print 4 lines if you want to be extra cheeky about it
>>52050063
Hey, OP. Look. It might almost be 2016, but remember you are not that far into your first year of computer science. These are fundamentals, though. Don't ask /g/ for a solution to your homework, ask one of your little university buddies to explain to you how it actually works.
If you can't solve this and you are not willing to learn, you will drop out next year.
@echo off
echo o
echo o o
echo o o o
echo o o o o
echo.
pause
puts ' .'
puts ' ..'
puts ' ...'
puts '....'
done
>newfags cant triforce /g/ edition
>>52050132
>unsafe const declarations
Might as well be writing assembly.//#include <stdlib.h>
main() {
const volatile unsigned char a[8] = 1?" *":"\0\0\0\0\0\0\0\0";
const volatile unsigned char b[8] = 1?" * *":"\0\0\0\0\0\0\0\0";
const volatile unsigned char c[8] = 1?" * * *":"\0\0\0\0\0\0\0\0";
const volatile unsigned char d[8] = 1?" * * * *":"\0\0\0\0\0\0\0\0";
const volatile unsigned char e[1] = 1?"\n":"\0";
if(!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1)
{
_write(1,a,8);
_write(1,e,1);
_write(1,b,8);
_write(1,e,1);
_write(1,c,8);
_write(1,e,1);
_write(1,d,8);
_write(1,e,1);
} else {
goto x;
}
x: return 0;
}
>>> meme(4)
.
..
...
....
>>> def meme(ayy):
... for x in range(ayy):
... print ' ' * (ayy - x) + '.' * (x+1)
...
>>> meme(1)
.
>>> meme(4)
.
..
...
....
>>> meme(10)
.
..
...
....
.....
......
.......
........
.........
..........
>>>
merry christmas, anon
>>52050382
>print ' ' * (ayy - x) + '.' * (x+1)
I wish Java would let you multiply print statements
>>52050063
I'm confused
do you want me to generate a bitmap that closely resembles that poorly aligned triangle in your image?
>>52050487
Exactly
>>52050086
This isn't fucking code, its terminal commands.
OP beat you
>>52050291
Kek
>>52050376
You kek'd me good anon.
for i in xrange(5):
for j in xrange(5 - i):
print(' '),
for j in xrange(i):
print('x'),
print('')
ezpz
http://pastebin.com/NHpLaEZ4
>>52050063
[CODE] firefox http://i.4cdn.org/g/1451062609822.png[/CODE]
>>52050896
>fwrite()
>not _write()
>>52050063
is the triangle all wibly wobbly on purpose?
>>52050063
Row r between 1 and R has (R-r) spaces followed by r dots. Do your own for-s.
print (" o", "\n o o", "\n o o o", "\no o o o")