119k views
22 votes
Write a program in QBasic to enter two numbers and print the greater one.​

2 Answers

6 votes

class one

{

public static void main ( )

{

int a = 1,b = 2;

if ( a > b )

{

System.out.print (" greater number is " + a);

}

else if ( a < b )

{

System.out.print (" greater number is " + b);

}

}

}

User Varun Naharia
by
4.4k points
12 votes

Answer:

REM

CLS

INPUT “ENTER ANY TWO NUMBERS”; A, B

IF A > B THEN

PRINT A; “IS GREATER”

ELSE

PRINT B; “IS GREATER”

END IF

END

User Bodman
by
5.1k points