Create a function gcd

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

You have to prepare the code in PHP.

Question 1: Create a function quadratic(x) that computes function f(x) with x as the only input parameter and returns f(x) = ax2 + bx + c with a = 1.0, b = 2.0, and c = 1.0.

In the body of your page create a loop that displays the values of x and the corresponding f(x) for the values of 5, 10, 15, 20 ... 100.

Question 2: Create a function gcd(a, b) that receives two integers and returns the greatest common denominator of the two integers.

Select five unique combinations for a and b. Using your function, show the values for a and b along with their greatest common denominator. Can somebody provide the answer for given question with example?

Reference no: EM13705151

Questions Cloud

Compute square roots to a desired degree of accuracy : write a program which will compute square roots to a desired degree of accuracy.
What is the total file transfer time : How many packets must be transmitted to accomplish the file transfer - What is the total file transfer time.
Explain how many photons are produced each second : Problem- A typical 100-watt light bulb consumes 100J of energy per second. If a light bulb converts all of this energy to 500nm light, how many photons are produced each second
Evaluate a polynomial at a given real value : Write a function to evaluate a polynomial at a given real value a.
Create a function gcd : Create a function gcd(a, b) that receives two integers and returns the greatest common denominator of the two integers.
Find the prime number and prepare the code in php : Create a function that checks if an integer n is a prime (returns true if the integer is prime and false otherwise). In the body of your page create a loop that uses this function to check and display all primes in a range from 1 to 100.
Create a void function that takes as parameters : Create a void function that takes as parameters two integers, adds them, and prints them out to the command line.
How much heat is released when 3g of hydrogen reacts : Problem- The enthalpy of formation of water is -241.8 kJ/mol. How much heat is released when 3g of hydrogen reacts with excess oxygen to form water
Print all lines where the birthdays are in november : Print all lines where the birthdays are in November or December - Append three asterisks to the end of lines starting with Fred

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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