Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
change c progrma to HLA assembly
SAMPLE C CODE:
------------------------
int i, n, j;
printf( "Feed Me:" );
scanf( "%d", &n );
for (i=1; i<=n; i++) {
if (i == 1 || i == n) { // first or last row
for (j = 1; j <= n; j++) {
printf( "%d", n );
}
printf( "\n" );
}
else { // internal rows of the box
printf( "%d", n );
for (j = 1; j <= n-2; j++) {
printf( " " );
}
printf( "%d", n );
printf( "\n" );
}
}
Here are some example program dialogues to guide your efforts:
Feed Me: 5
55555
5 5
5 5
5 5
55555
Feed Me: -6
Feed Me: 3
333
3 3
333
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- C++ Programmingarrow_forwardConvert the following c++ code into pep9 assembly language #include <iostream> using namespace std; void times(int& prod, int mpr, int mcand) { prod = 0; while (mpr != 0) { if (mpr % 2 == 1) prod = prod + mcand; mpr /= 2; mcand *= 2; } } int main(){ int product, n, m; cout << "Enter two numbers: "; cin >> n >> m; times(product, n, m); cout << "Product: " << product << endl; return 0; }arrow_forwardChange from psuedocode to source code in C language: START MetGoalCtr = 0 FailedCtr = 0 TotalSales = 0 GET Level while (Level != 'X' && Level != 'x') { switch(Level) { case 'a': case 'A':SalesGoal = 15000.00 break case 'b': case 'B':SalesGoal = 10000.00 break case 'c': case 'C':SalesGoal = 5000.00 break default:SalesGoal =60000.00 } GET ActualSales TotalSales += ActualSales if (ActualSales >= SalesGoal) { ++MetGoalCtr } else { ++FailedCtr } GET Level } DISPLAY TotalSales) DISPLAY MetGoalCtr) DISPLAY FailedCtr) STOParrow_forward
- Format Requirement Algorithms in pseudo code MUST be placed in code blocks/fences, and use either the cpp or java syntax highlighter. Algorithms should follow the pseudo code standard described in handout 1. Your pseudo code should be placed in a code block, for example Algorithm alg_name(a, b) { // A description of the algorithm // input: a - a positive decimal integer; b - an integer // ouput: the sum of a and b c = a + b // or, c <- a + b return c } Do NOT change the template except the answer portion. Formulas and equations should be in math mode using Latex math symbols. Markdown math tutorial: http://tug.ctan.org/info/undergradmath/undergradmath.pdf Ways enter into the math mode in Notion: https://www.notion.so/help/math-equationsarrow_forwardPlease help me with this Principles of programming language homework questionarrow_forwardtranslate a c++ program into pep/9 assembly language #include <iostream> using namespace std; int myAge;void ShowVal(int age){ cout << "Age:" << age << endl;} int main() {cout << "Enter age: ";cin >> myAge;ShowVal(myAge);return 0;}arrow_forward
- Convert the following C++ programs into Pep/9 assembly #include <iostream> using namespace std; void times(int& prod, int mpr, int mcand) { prod = 0; while (mpr != 0) { if (mpr % 2 == 1) prod = prod + mcand; mpr /= 2; mcand *= 2; } } int main(){ int product, n, m; cout << "Enter two numbers: "; cin >> n >> m; times(product, n, m); cout << "Product: " << product << endl; return 0; } Submit: Pep/9 source code along with screen capture showing it running in the Pep simulatorarrow_forwardConvert the following C++ program to pep9/Assembly language BR Main format not machine language #include <iostream>using namespace std; int times(int mpr, int mcand){int prod = 0;while (mpr != 0){if (mpr % 2 == 1)prod = prod + mcand;mpr /= 2;mcand *= 2;} return prod;} int main(){ int n, m; cout << "Enter two numbers: ";cin >> n >> m; cout << "Product: " << times(n, m) << endl; return 0;}arrow_forwardFormat Requirement Algorithms in pseudo code MUST be placed in code blocks/fences, and use either the cpp or java syntax highlighter. Algorithms should follow the pseudo code standard described in handout 1. Your pseudo code should be placed in a code block, for example Algorithm alg_name(a, b) { // A description of the algorithm // input: a - a positive decimal integer; b - an integer // ouput: the sum of a and b c = a + b // or, c <- a + b return c } Do NOT change the template except the answer portion. Formulas and equations should be in math mode using Latex math symbols. Markdown math tutorial: http://tug.ctan.org/info/undergradmath/undergradmath.pdf Ways enter into the math mode in Notion: https://www.notion.so/help/math-equationsarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education