Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
March 22, 2022 04:54 pm GMT

Programs using Bhailang

Bhailang is a language which has taken the social media in India by storm. According to its documentation the developers of this language has described it as

Bhailang is dynamically typed toy programming language, based on an inside joke, written in Typescript.

I have written two programs using this language the first one prints table of 3 and the next one explains the syntax for nested loops and ladder if statements in the language.

Program for Table of 3

hi bhai  bhai ye hai a = 3;  bhai ye hai b = 0;  jab tak bhai (b < 10) {    b += 1;    bol bhai a," * ", b, " = ", a*b  ;  }bye bhai

Output of Program

Program for nested loops and ladder if

hi bhai  //variable declaration  bhai ye hai a = 0;  bhai ye hai b = 0;  bhai ye hai t = 0; // Outer while loop  jab tak bhai (a < 3)  {  t = a+1;  //if statement  agar bhai (t == 1)   {     bol bhai "Pehli";  }  //else if statement  nahi to bhai (t == 2)  {     bol bhai "Doosri";  }  //else statement  warna bhai   {     bol bhai "Teesri";  }  bol bhai " baar Bahar" ;  bhai ye hai b = 0;  // inner loop    jab tak bhai (b <= a)    {      t = b+1;      bol bhai  b+1," baar Andar";      b+=1;    }    a += 1;  }bye bhai

Output program 2

Others can try different programs using the link given below
https://bhailang.js.org/#playground


Original Link: https://dev.to/amananandrai/programs-using-bhailang-f5m

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To