Skip to content

Instantly share code, notes, and snippets.

@kamiyaowl
Created March 25, 2014 06:44
Show Gist options
  • Save kamiyaowl/9756333 to your computer and use it in GitHub Desktop.
Save kamiyaowl/9756333 to your computer and use it in GitHub Desktop.
お誕生日おめでとう!
おおお誕誕誕生生生日日日おおおめめめでででとととううう!!!
using System;
using System.Text;
using System.Linq;
class Happy {
static void Main() {
var str = string.Join("", from p in "お誕生日おめでとう!" select p.Prime(3));
Console.WriteLine(str);
}
}
static class HappyExtension {
public static string Prime(this char c,int p) {
var sb = new StringBuilder();
for(int i = 0 ; i < p ; ++i) sb.Append(c);
return sb.ToString();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment