How to resolve the algorithm User input/Graphical step by step in the Icon and Unicon programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm User input/Graphical step by step in the Icon and Unicon 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 Icon and Unicon programming language

Source code in the icon programming language

procedure main() 
WOpen("size=800,800") | stop("Unable to open window")
WWrite("Enter a string:")
s := WRead()
WWrite("You entered ",image(s))
WWrite("Enter the integer 75000:")
i := WRead()
if i := integer(i) then 
   WWrite("You entered: ",i)
else
   WWrite(image(i)," isn't an integer")
WDone()
end

link graphics


  

You may also check:How to resolve the algorithm Pangram checker step by step in the MATLAB programming language
You may also check:How to resolve the algorithm Successive prime differences step by step in the XPL0 programming language
You may also check:How to resolve the algorithm Empty string step by step in the Phix programming language
You may also check:How to resolve the algorithm Inheritance/Multiple step by step in the Aikido programming language
You may also check:How to resolve the algorithm Spinning rod animation/Text step by step in the jq programming language