Sample codes
1. Program to Say hello!
{
name: Main
println("Hello, SRON!")
}OUTPUT:
2. Program to check if a given number is even or odd.
{
name: oddEven
Int val = inputInt("Enter the value :- ")
if: {
condition: ${ val % 2 == 0 }
println("Even number")
}
else: {
println("Odd number")
}
}
{
name : Main
oddEven()
}TERMINAL:
3. Program to use command line arguments.
TERMINAL:
4. Program to print integers from 0 to 100,000 using for loop.
TERMINAL:
5. Program to find factorial of a given number.
TERMINAL:
6. Program to find if a given number is Armstrong or not.
TERMINAL:
7. Program to detect the name of the operating system.
TERMINAL:
8. Program to print colorful text on terminal/cli
TERMINAL:
9. Program to create a simple calculator
TERMINAL:
Last updated