Problem 1greatest common divisor write code for a recursive

Assignment Help C/C++ Programming
Reference no: EM13347728

Problem 1

Greatest Common Divisor Write code for a recursive implementation of Euclid's algorithm for searching the greatest common divisor (GCD) of two integers. Descriptions of this algorithm are given in algebra books and on the Web. Prepare a test program that calls your GCD procedure five times, using the subsequent pairs of integers: (5,20), (24,18), (11,7), (432,226), (26,13). After each procedure call, shows the GCD.

Problem 2

Prepare a procedure named Str_concat that concatenates a source string to the end of a target string. Sufficient space must exist in the target string to accommodate the new characters. Pass pointers to the source and target strings. Here is a sample call:

.data
targetStr BYTE "ABCDE",10 DUP(0)
sourceStr BYTE "FGH",0
.code
INVOKE Str_concat, ADDR targetStr, ADDR sourceStr

Problem 3

Prepare a macro that writes a null-terminated string to the console with a given text color. The macro parameters should include the string name and the color. Hint: Call SetTextColor from the book's link library. Write a program that tests your macro with several strings in different colors. Sample call:
.data
myStringdb "Here is my string",0
.code
mWritestringmyString, white

Problem 4

Write a code that inputs the subsequent information from the user, using the Win32 ReadConsole function: first name, last name, age, phone number. Redisplay the same information with labels and attractive formatting, using the Win32 WriteConsole function. Do not use any procedures from the Irvine32 library.

Reference no: EM13347728

Questions Cloud

Xyz common currently sells for 3share you believe that : xyz common currently sells for 3share. you believe that one-month hence the stock could be worth 8 or could be
As a borrower which of the following two 30 year monthly : as a borrower which of the following two 30 year monthly payment loans could you select and why if you had a 10 year
1- solve the partial derivative of the following : 1- solve the partial derivative of the following functions with respect to each independent variable2- does any of
Analysis of a proposed soda taxarticle from the wall street : analysis of a proposed soda taxarticle from the wall street journal entitled soda tax weighed to pay for health
Problem 1greatest common divisor write code for a recursive : problem 1greatest common divisor write code for a recursive implementation of euclids algorithm for searching the
Question 1calculation of a laplace transform from first : question 1calculation of a laplace transform from first principles.write a comment in each of the boxes to explain the
Part - 1q 1 define benchmarkingq 2 what is the need for : part - 1q. 1. define benchmarking.q. 2. what is the need for benchmarking?q. 3. what are the types of benchmarking?q.
Write a market research reportfinal conclusion of the : write a market research reportfinal conclusion of the launching of this mall either this shopping malls idea is
Part a write a program to evaluate the first 20 numbers of : part a write a program to evaluate the first 20 numbers of fibonacci series. use the stack memory to store the

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Your city''s parking violation

Your city's Parking Violation Bureau wants you to write a program to compute fines for parking violations.

  What is the output of this code fragment as it is written

In the code fragment below, the programmer has almost certainly made an error in the first line of the conditional statement.

  Write a program to hold an array of 20 numbers read

Write a program to hold an array of 20 numbers read in from the keyboard and display them backwards. Use a array and a loop to cycle through the numbers.

  Write a menu-driven c program

Write a menu-driven C program with appropriate functions that allows the user to fill an array of 50 integers with random numbers on the range 1...999, inclusive, sort it, and then find search it to determine if a given random number was generated..

  Determine the meaof the numbers in the array

Determine the mean(average) of the numbers in the array, and output the reslt. Use a subprogram to input the numbers, a function to find the mean.

  The initial data structure with information about a service

Implement a program using function for a defined task. Initial data is read from a file and added from keyboard. Program has to output initial and resulting data.The initial data structure with information about a service:

  A perfect solution is impossible or too expensive

Optimization is often encountered in engineering problems. More often than not, a perfect solution is impossible or too expensive to find and implement. Therefore, we resort to sub-optimal, yet useful, solutions. This assignment tackles a classical p..

  Implement a semantic analysis

The program will implement Semantic Analysis. The assignment provides two options to define variable scope, either using the Global Option or the Local Option.

  Write a loop to total and average the contents of the array

Given the following code, write a loop to total and average the contents of the array.

  Write a method named negative sum

Write a method named negativeSum that accepts a Scanner as a parameter reading input from a file containing a series of integers, and determine whether the sum starting from the first number is ever negative

  Write a loop that fills a vector

Write a loop that fills a vector V with ten  different  random numbers between 1 and 100. output must actually display the random numbers to get credit.

  Create a friend class

Create a Friend class that contains a first name, last name, a birthday, and a telephone number. Create a Contacts class that contains an array of Friend as well as the owner's name and cell phone Number.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd