> ## Content Index
> Fetch the complete content index at: https://developerinsider.co/llms.txt
> Use this file to discover other available public pages before exploring further.

# Sing Happy Birthday to your favourite programming language - Programming Puzzles
- URL: https://developerinsider.co/sing-happy-birthday-to-your-favourite-programming-language-programming-puzzles/
- Published: 2016-11-25T19:34:51.000Z
- Updated: 2018-03-29T17:01:03.000Z
- Author: Vineet Choudhary
- Tags: Programming Puzzles, Puzzles

Your favourite programming language has just had a birthday. Be nice and sing it the Happy Birthday song.

Of course you should accomplish this by writing a program in that language. The program takes no input, and writes the following text to the standard output or an arbitrary file:

```
Happy Birthday to You
Happy Birthday to You
Happy Birthday Dear [your favourite programming language]
Happy Birthday to You

```

But you can't repeat any word in hard coded string.

# Solutions

**Jump to [C](#c), [CSharp](#csharp), [JavaScript](#javascript), [PHP](#php) Solution.**  
You can submit your own solution in [comment section](#comments) in same/different programming language. If your solution is better or in different language we'll add here.

## C

```c
#include<stdio.h>
int main()
{
	for(int c;c-5;)
		printf("Happy Birthday %s\n",++c-4?"To You":"Dear C");
	return 0;
}

```

## CSharp

```csharp
using System;

namespace testcs
{
    class Program
    {
        static void Main(string[] args)
        {
            string x = "\nHappy Birthday ", y = x + "to You";
            Console.Write(y + y + x + "Dear C#" + y);
        }
    }
}

```

## JavaScript

```js
<html>  
<body> 
    <script>
        console.log(a=(b="Happy Birthday ")+"to You\n",a,b+"Dear Javascript\n",a)
    </script>
</body>  
</html>

```

## PHP

```php
<? $h="<br>Happy birthday ";$t="to you";$d="dear PHP";echo "$h$t$h$t$h$d$h$t";

```