Computer Science, asked by atiya31, 5 months ago

write a program to check the input number is greater than 5 or less than 5 or equal to 5. ​

Answers

Answered by soumikamink
1

Answer:

You didn't mention which programming language...

So this is in java

import java.util.*;

public class number

{

   public static void main(String args[])

   {

      int a;

Scanner in= new Scanner(System.in);

System.out.println("Enter a number");

a=in.nextInt();

if(a>5)

{

System.out.println("The number is greater than 5);

}

if(a<=5)

{

System.out.println("The number is less than or equal to 5);

}

}

}

Have a nice day:)

Similar questions
Math, 11 months ago