Skillz. You got 'em?

Let us see who has the fastest programming skillz.

Write a program in c++ that prints (to the terminal) a reasonable approximation of the outline of the Swedish flag.

More props if you can get it to output in the correct colors as well.

Other urls found in this thread:

pastebin.com/e15mqS5N
0x0.st/L6_.c
github.com/jingweno/ccat
github.com/ryanmjacobs/c
twitter.com/NSFWRedditGif

I won't do your homework.

i won't draw anything about that cuckistan

>swedish flag
You mean dannebrog the danish flag, right?

Please..? It's part of my final exam and I DON'T have the skillz..

_____________
l.....|...............l
l-------------------l
l.....|...............l

There you go faggot. Put that in the print statement

>that font you must be using
I feel sorry user

std::cout

pastebin.com/e15mqS5N
Done

Comic sans :^)

"[-¦--]" *

PUT ME IN THE SCREENCAP

stealing this

/thread

Wow.

...

2017

y u no terminfo ?

What?

man tigetstr

source too long to post here
0x0.st/L6_.c

Do you have the faintest clue what you're talking about or are you just spouting names you barely understand? What retarded thing are you implying I should be doing? Do you want me to use curses for something as simple as this?

nice

>ccat
>c
what are these aliases?

oh my god

Using raw ANSI escape codes is not a very good practice. You should use the terminfo database, via the tigetstr() function for instance.

ccat is its own utility that works like cat but with syntax highlighting (colored cat)

c is a small script that compiles a C file and then runs the resulting binary if it compiles.

Thank you for actually using a sentence.
I wasn't exactly going for good practice in that tiny code snippet created in response to a shitpost.

>Please..? It's part of my final exam and I DON'T have the skillz..
this is really fucking easy you retard
you probably wouldn't even need to use curses or a similar lib for it.

>ccat is its own utility that works like cat but with syntax highlighting (colored cat)
>c is a small script that compiles a C file and then runs the resulting binary if it compiles.
I obviously saw the screenshot, I know what they do. In case it wasn't clear: I'm asking you for the source.

i like your terminal user

github.com/jingweno/ccat
wow that took me like 3 whole seconds of googling

"ccat" Github is in the first Google results.
"c" shouldn't be very hard to mimic...

Yeah, sorry about that. I think I wanted to spread my knowledge and that was a dick move.

github.com/jingweno/ccat
github.com/ryanmjacobs/c

Thanks, seems I was expecting them to be something else. ‘ccat’ looked like it was an alias for something like pygments or whatever else that supports more languages than just C, rather than a dedicated program.

‘c’ looked like it was a neat little one-line alias/function or something I could copy/paste into my zshrc, rather than something I'd have to compile and package first. Oh well, at this point it's more effort than it's worth.

>‘c’ looked like it was a neat little one-line alias/function or something I could copy/paste into my zshrc
You could trivially write something like that and it would only be slightly less robust than the package

>You could trivially write something like that and it would only be slightly less robust than the package
I know, but see
>at this point it's more effort than it's worth.

It's not really about the utility, I just get excited copy/pasting neat zsh tricks from other people. Ever been to a “zsh tricks” or “vim tricks” thread? It makes me feel warm and fuzzy inside

I was hoping for that, but I did not get it. Oh well

if you cant do this simple task you dont deserve your grade

'c' is probably pretty simple. Something like this would work fine
c () {
tmp=$(mktemp)
cc -std=c99 $1 -o $tmp && $tmp
rm -f $tmp
}

You could improve it by having env variables change the compiler flags or output location

tjena bögjävel, gymnasienivå eller högre?

Hmm, maybe this could be improved so that it also works on STDIN instead of a filename

that would be an excellent feature.
but
>C REPL
every day we stray further from god's light

here's a cgi file
#include
using namespace std;

int main() {
cout

lets_doxx_op.cpp

1. Let's check all swedish universities with running C++ courses and look for that specific assignment. Shouldn't be too many.

2. Screenshot this and all the solutions here.

3. Send it to the course the day after people are supposed to send the exercise.

4. Profit.

...

Nah, fuck that shit.

That c thing is pretty cool. The ability to use a shebang and make a c "script" is actually pretty neat, hadn't thought about the possibility of doing that before.

What'd you use to generate that?

One more reason to do this:
I utterly hate homework fags. I hate how EVERY SINGLE TIME somebody is going to spoon feed them. I hate how some people will work until 4 AM to get a good solution and some idiots are just getting it for free.

Don't get me wrong, if people come here with a specific question I really like helping them. But this "homework white knighting" has to stop. It pisses me off so much.

I would much rather understand the process of how to go about writing the code anyways (especially how to produce the color) for future projects.

Shillz? We got more than enough of them. You can take some on your way back

honestly i wish the shit i was doing on my finals was this easy, this would literally take me a few seconds at most.

We're not doing your homework for you, Ahmed.

You should do your own homework like Erik and Gustav.

printf("[--|--]\n")

there you go, I hope the microsoft overlords approve your application pajeet

#include

using namespace std;

int main()
{
for (int i = 0; i < 16; i++) {
for (int i = 0; i < 20; i++) {
cout

?

ayy lmao