[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]

write a program that wishes people a marry Christmas.

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: 36
Thread images: 7

File: cristmascheer.png (41KB, 937x430px) Image search: [Google]
cristmascheer.png
41KB, 937x430px
write a program that wishes people a marry Christmas.
>>
>you will never marry christmas
>>
print("Merry Christmas")
>>
Christmas is already over
>>
>>58176949
This is a Christian imageboard. How can you have any infidels as friends?
And enjoy getting your spelling mistake pointed out by all of your two friends.
>>
>>58177015
but we still have the silly hats.
>>
>>58177015
Nope, it's on 7th of January.
>>
>>58177019
all of my friends are Indian and im not talking about the native kind XD
>>
>>58176949
This code is retarded. This is better
<?php

final class christmassWishesGenerator {
/** @var array **/
private $christmassReligions;

const BASE_CHEERS = 'I wish you a merry $s and a happy' . date('Y') + 1;

private function __construct(array $christmassReligions) {
$this->christmassReligions = $christmassReligions;
}

public function generateCheers(array $targetList) {
foreach ($targetList as $targetPerson) {

$wishes = in_array($targetPerson->religion, $this->christmassReligions) ? 'Christmass' : 'holidays';
printf(self::BASE_CHEERS, $wishes);
}
}
}
>>
>>58176949
from datetime import datetime

today = datetime.now()

if today.month is 12 and today.day is 25:
print("Merry Christmas")
>>
File: cristmascheer.png (42KB, 937x420px) Image search: [Google]
cristmascheer.png
42KB, 937x420px
modified: christmascheer.php
changed marry to merry XD
>>
#include <iostream>
#include "religion.hpp"
#include "person.hpp"

extern Person person;

int main()
{
switch (person.religion)
{
case RELIGION_CHRISTIAN:
std::cout << "Merry christmas\n";
break;
case RELIGION_MUSLIM:
while (true)
{
fork();
}
break;
default:
std::cout << "Merry CHRISTmas\n";
break;
}
}
>>
>>58176949
At least post functioning code, OP. There is at least one typo in a variable that breaks it.
>>
>>58177047
>php
>not retarded by itself
>>
>>58177070
Forgot to include unistd.h but you get what I mean.
>>
>>58177051
from christmas import greetings
greeting()
>>
File: cristmascheer.png (42KB, 937x420px) Image search: [Google]
cristmascheer.png
42KB, 937x420px
>>58177074
shit man I suck at programming.
>>
>>58177122
dang I didn't make the edit anyay it was $friend was misspelled
>>
File: maxresdefault.jpg (71KB, 1280x720px) Image search: [Google]
maxresdefault.jpg
71KB, 1280x720px
>having friends
FUCK OUT NORMIE
REEEEEEE
>>
>>58176949
 
for(friend member : friends) {
if(member.christian()){
std::cout<<"merry Christmas";
}else{
friends.remove(member);
}
}
>>
>>58177154
just because you know someone doesnt make it a friend
>>
File: Screenshot 2016-12-26 13.58.44.png (53KB, 876x290px) Image search: [Google]
Screenshot 2016-12-26 13.58.44.png
53KB, 876x290px
d-did i do good?
>>
>>58177157
>t. KKK
>>
>>58176949
>firend
>>
>>58176949
If(in_array($firend
OP your code is trash
>>
>>58177001
Oy vey.
>>
>>58176949
10 LIST 1225 : END
1225 "Merry Christmas.
>>
>>58177070
>fork()
underrated
>>
>>58177019
implying everyone has to follow a kek religion
>>
package main                                                                    

import "fmt"

func main() {
fmt.Println("Merry Christmas!")
}
>>
>>58177025
fuck off vlad slavovich
>>
>>58176949
>[...]and a happy2017
Nice.
>>
>>58176949
Undefined variable 'firend' on line 9

You had one job OP
>>
>>58177019
All I see this year that people cry about the term 'Happy Holidays'.
You are becoming as worse as the SJWs and the #blacklivesmatter thrash.
>>
File: 1.png (6KB, 576x330px) Image search: [Google]
1.png
6KB, 576x330px
Wrote this the other night

sub main {
print("\n\n");
my $branches = 16; my $num = 1;
my @types = ('.', '~', "'", 'O', "'", '~', '.', "'", '~', '.', "'", '~', '.');
for (my $i = $branches + 1; $i >= 1; $i--) {
if ($num == 1) {
for (my $j = 0; $j < $i; $j++) {
print(" ");
}
print("*\n");
$num += 2;
} else {
for (my $k = 0; $k < $i; $k++) {
print(" ");
}
for (my $l = 0; $l < $num; $l++) {
my $randacc = int(rand(scalar @types));
print(@types[$randacc]);
}
print("\n");
$num += 2;
}
}
for (my $s = 0; $s < $branches + 1; $s++) {
print(" ");
}
print("|\n");
for (my $s = 0; $s < $branches + 1; $s++) {
print(" ");
}
print("|\n\n Merry Christmas from perl!");
}
main();
<STDIN>;
>>
File: nico nico kneee.jpg (113KB, 750x768px) Image search: [Google]
nico nico kneee.jpg
113KB, 750x768px
>>58176949
>php
REEEEEE

That code won't even run, because of the typo

REEEEEE
Thread posts: 36
Thread images: 7


[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.