[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

I'm supposed to do this programming test for a job interview.

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 10
Thread images: 4

File: test screenshot.png (31KB, 602x685px) Image search: [Google]
test screenshot.png
31KB, 602x685px
I'm supposed to do this programming test for a job interview. I'm fine with C++, but this quiz is clear as mud. Am I supposed to use a library? Do they want something to appear on screen?

I guess I'll email them and ask, but holy shit fuck this company already.
>>
>giving the company free source code
sorry but they won't be calling you back
>>
>>57364915
You're probably not supposed to use a library.
As for what kind of output they want, I have no clue, but they do specify mm, so maybe they want you to actually be printing these fucking things? Or maybe they use the measurement to just give you a ratio?

Regardless, fucking ask them.
If you actually got a job there they'd probably want you to ask questions rather than just fuck their shit up.
>>
>>57365001
Not even a graphics library?
>>
>>57365016
Depends on what kind of output they want, as I said, just fucking ask them.
>>
File: o.jpg (12KB, 516x100px) Image search: [Google]
o.jpg
12KB, 516x100px
>>57364915
dis thread demeans us both

#include <stdio.h>

int grate_width = 12;

int grates = 22;

int height = 100;

void print(char *s, int n)
{
while (n--)
puts(s);
}

void putgrates(char *gratecol, int n, int width)
{
int i;

for (i = 0; i < n; i++) {
printf("0 0 0\n");
print(gratecol, width-2);
printf("0 0 0\n");
if (i < n-1)
print("255 255 255\n", width);
}
}

int main(void)
{
printf("P3\n%d %d\n255\n", grate_width*grates + grate_width*(grates-1), height);
putgrates("0 0 0\n", grates, grate_width);
while (--height > 1)
putgrates("65 113 156\n", grates, grate_width);
putgrates("0 0 0\n", grates, grate_width);
return 0;
}
>>
>>57364915
they are probably asking you to generate PostScript file from scratch

>>57364944
they have explicitly say said that "We draw grating pattern on the eraser" so it implies they don't need it.
I mean fuck programmers are really spoiled.

Regardless OP, could you tell the name of the company?
>>
You can do it in matlab very quickly I think. Just make a sin image and go.
>>
File: foo.png (229B, 100x100px) Image search: [Google]
foo.png
229B, 100x100px
Assuming 1px = 1mm.

main = let dim@[width, height] = [100, 100]
header = unlines ["P3", unwords $ map show dim, "255"]
line = unwords $ take width $ cycle ["0 0 0", "255 255 255"]
in mapM_ putStrLn $ header : (replicate height line)
>>
>>57367343
>haskell
Thread posts: 10
Thread images: 4


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.