Westonci.ca connects you with experts who provide insightful answers to your questions. Join us today and start learning! Ask your questions and receive precise answers from experienced professionals across different disciplines. Our platform offers a seamless experience for finding reliable answers from a network of knowledgeable professionals.


Write a program in QBasic to enter two numbers and print the greater one.​


Sagot :

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

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);

}

}

}