GO Program to Check Whether a Number is Palindrome or Not

Simple program in go language using for...... loop to check whether an integer (entered by the user) is Palindrome or Not. if...else statement used to display final output.
// Golang program to check whether a number is palindrome or not

package main
import "fmt"

func main() {
	var number,remainder,temp int
	var reverse int = 0

	fmt.Print("Enter any positive integer : ")


	// For Loop used in format of While Loop
		remainder = number%10
		reverse = reverse*10 + remainder
		number /= 10

			break // Break Statement used to exit from loop

		fmt.Printf("%d is a Palindrome",temp)
		fmt.Printf("%d is not a Palindrome",temp)


Thanks for reading. Please leave your valuable feedback and comments.

* Required Fields