Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In assembly language create a program PROG2.EXE that will: 1. Output a prompt ch

ID: 3882337 • Letter: I

Question

 In assembly language create a program PROG2.EXE that will:  1.   Output a prompt character '?'  2.   Read in a character  3.   If the character is a decimal digit n  then output the digit n      on the next line n+1 times.      If the character is not a decimal digit then exit.       An example of a program run is:  C:>PROG2 ?1 11 C:>PROG2 ?a C:>PROG2 ?0 0 C:>PROG2 ?3 3333 C:>  Email to me at ytha.yu@csueastbay.edu with the source code of your asm file pasted in your email  Be sure to include documentation (your name, date, and what the program does) in your program and add comments.  Note that points are deducted if the source code is not pasted in the email. 

Explanation / Answer

SOURCE CODE :

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

namespace addix
{
public class Program
{
public static void Main(string[] args)
{
  
Console.WriteLine("?");
int a;
try{
a=Convert.ToInt32(Console.ReadLine());
for(int i=0;i<a+1;i++){
Console.Write(a);
}
  
}
catch(Exception e){
Console.WriteLine("");
  
}
}
}
}

OUTPUT:

Compilation succeeded
?
222

Compilation succeeded
?
3333

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote