Recent Post

Example 1: Checking If A Number Is Greater Than 100 Or Not!

The first thing to do is taking an user input and then compare it with the 100.
#!/usr/bin/tclsh

puts "Enter a number: "
gets stdin number

if {$number > 1 && $number < 100} {
	puts "Less than 100!"
} else {
	puts "Greater than 100!"
}
Output:
Enter a number:
56
Less than 100!
Enter a number:
124
Greater than 100!

Comments