Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a Go program to demonstrate the use of the if statement by checking if a variable x = 20 is greater than 10.

Easy

Problem Statement

Create a Go program to demonstrate the use of the if statement by checking if a variable x = 20 is greater than 10.

Sample Input

A predefined variable x = 20.

Sample Output

x is greater than 10.

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
package main import "fmt" func main() { // Use an if statement to check the condition }
Log in or sign up to run or submit your code.Log inSign up
Input
A predefined variable x = 20.
Expected Output
x is greater than 10.