User Input

From Rosetta Code
Revision as of 16:41, 9 January 2007 by MikeMol (talk | contribs) (Creation, inclusion of data from old console-only page.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

Text Terminal

Perl

Interpreter: Perl 5.8.8

#!/usr/bin/perl -w

use strict;

my $string = <STDIN>;
my $integer = <STDIN>;

UNIX Shell

Interpreter: Debian Almquish Shell (dash)

#!/bin/sh

read STRING
read INTEGER

Interpreter: Bourne Again SHell (bash)

#!/bin/bash

read STRING
read INTEGER

GUI