Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HAS to be pep/8 assembly language Can someone please explain how to convert the following C++ code to pep/8 assembly language? Having a hard time.

HAS to be pep/8 assembly language

Can someone please explain how to convert the following C++ code to pep/8 assembly language? Having a hard time. The code changes any lowercase letter to the next letter in the alphabet capitalized. If it's a non letter, it notifies the user.

#include

#include

#include

using namespace std;

//function declaration

char Convert_uppercase (char l)

{

//convert lowercase to uppercase

if ((l >= 'a') && (l <= 'z'))

{

//return the charater

return l - 'a' + 'A';

}

}

int main()

{

//declare variables

char lowercase,uppercase;

cout<<"Enter Lower case character:";

//read user input character

cin>>lowercase;

//check if it is character 'z'

if(lowercase=='z')

cout<<"Converted to: "<<'A' <

// check input is number or character

else if((isalpha(lowercase))&&(lowercase!='z'))

{

//call conversion function

uppercase=Convert_uppercase (lowercase);

//Display the upper case

cout<<"Uppercase:"<

//Display next character

cout<<"Incremented Character:"<(uppercase + 1)<

}

else

{

//display not a character

cout<<"NOT a character:"<

}

system("pause");

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions

Question

J. What is cullaborati\"e webbased software?

Answered: 1 week ago

Question

What is the relation of physical mathematics with examples?

Answered: 1 week ago

Question

What are oxidation and reduction reactions? Explain with examples

Answered: 1 week ago