Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* Could anyone will help me to solve the attached prob in "alpha assembly language?"
@ 2000-03-27  5:00 Lutfor Rahman
  0 siblings, 0 replies; only message in thread
From: Lutfor Rahman @ 2000-03-27  5:00 UTC (permalink / raw)


1
________________________________________________________________________
Write an Alpha assembly language program which behaves as below:
1. Prompts the user for an input string with a message "Please enter a
string:". It should be
assumed that the string contains at least one and at most fifteen
characters.
2. After accepting an input string from the user, prints out "The output
string is :". Then,
the program should behave as below depending on the input string :
If the input string contains exactly one letter "A", the program converts
all the letters in
the string to capital case letters and prints out the converted string.
In all other cases, the program prints out the characters with even number
index in the
string in reverse order. It should be assumed that the first character in
the string has
index 0, the second character in the string has index 1, the third character
in the string
has index 2 and so on. Therefore, for string "a-z", the index of "a" is 0,
the index of "-"
is 1 and the index of "z" is 2. Hence, the output of the program should be
"za".
3. Prints out a message "What to do next (continue/stop)?". The user should
reply with
either "continue" or "stop".
4. Checks the user's reply. When checking the user's reply, the case of the
letters should
be ignored. For example, "ContinUe" should be regarded the same as
 "continue".
If the reply is "continue", the program goes to step 1.
If the reply is "stop", the program terminates.
If the reply is neither "continue" nor "stop", the program goes to step 3.
Here is a sample session (with the user's input in italics):
Please enter a string: A90fgk-)
The output string is: A90FGK-)
What to do next (continue/stop)? CONTINue
Please enter a string: ksjair908Akd
The output string is: KSJAIR908AKD
What to do next (continue/stop)? continue
Please enter a string: A8976A-The
output string is: -69A
What to do next (continue/stop)? Continu
What to do next (continue/stop)? Continue
Please enter a string: 13257+A
The output string is: 13257+A
What to do next (continue/stop)? continue
Please enter a string: !-)
The output string is: )!
What to do next (continue/stop)? Stopp
What to do next (continue/stop)? Stop







^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-03-27  5:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-03-27  5:00 Could anyone will help me to solve the attached prob in "alpha assembly language?" Lutfor Rahman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox