How to resolve the algorithm User input/Graphical step by step in the PowerBASIC programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm User input/Graphical step by step in the PowerBASIC programming language

Table of Contents

Problem Statement

In this task, the goal is to input a string and the integer 75000, from graphical user interface.

See also: User input/Text

Let's start with the solution:

Step by Step solution about How to resolve the algorithm User input/Graphical step by step in the PowerBASIC programming language

Source code in the powerbasic programming language

FUNCTION PBMAIN () AS LONG
    result$ = INPUTBOX$("Enter a string.")
    MSGBOX result$
    DO
        'This assumes that 75000 is the ONLY valid input.
        result$ = INPUTBOX$("Enter the number 75000.")
        IF VAL(result$) <> 75000 THEN
            MSGBOX "You need to enter 75000!"
        ELSE
            MSGBOX "You entered the right number."
            EXIT DO
        END IF
    LOOP
END FUNCTION

  

You may also check:How to resolve the algorithm Compile-time calculation step by step in the C++ programming language
You may also check:How to resolve the algorithm Assertions step by step in the 11l programming language
You may also check:How to resolve the algorithm File modification time step by step in the Modula-3 programming language
You may also check:How to resolve the algorithm Sierpinski carpet step by step in the PL/I programming language
You may also check:How to resolve the algorithm Create a file step by step in the Julia programming language