Programming in C
4th Edition
ISBN: 9780321776419
Author: Stephen G. Kochan
Publisher: Addison-Wesley
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 3, Problem 6E
Explanation of Solution
The following program demonstrates the polynomial function.
//include the header file
#include <stdio.h>
//definition of main method
int main (void)
{
//declare and initialize the variable
float x = 2.55, ans;
//calculate the ans
ans = 3 * (x * x * x) - 5 *...
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
Write an expression that returns a random integer between 34 and 55, inclusively.
Computer Science
This is an introductory exercise to the manipulation of random variables with Python as a language
for scientific computing and numerical computation.
You have:
f(x) = Ae-0.1x)° 4
x*, 0
Q1/A-Write a program to compute the mass flow rate of a fluid (in kg/sec) through a
thermal unit according to the following equation:
K
AMPO RTO
m²
(K + 1)
2M²](K+1)/(2(K+1)]
where:
QBasic
A=0.25 m² is the area
M=2.0 Mach number of the fluid flow
Po=200.0 kPa is the pressure of the fluid
K = 1.4 is the ratio of specific heats of fluid
R=0.287 kJ/(kg-K) is the gas constant
To 300 K is the temperature of the fluid
Knowledge Booster
Similar questions
- T can be approximated by using the following infinite series: +-+...) Write a program that prints out two versions of the approximation one that goes out to a denominator of 13 and one that goes out of a denominator of 15. T=4 1 3 5 7 9 Note you will want to use 1.0 for your numerators. In my code I used a decimal version for all of these integers.arrow_forwardWrite a function that finds n-th fibonacci number. Ex: n=8 ....21 WRITE IN PYTHONarrow_forwardwrite the code that computes z= square root of y - xarrow_forward
- Code the follow.arrow_forwardIn c++arrow_forward/*code Kth Largest Factor A positive integer d is said to be a factor of another positive integer N if when N is divided by d, the remainder obtained is zero. For example, for number 12, there are 6 factors 1, 2, 3, 4, 6, 12. Every positive integer k has at least two factors, 1 and the number k itself.Given two positive integers N and k, write a program to print the kth largest factor of N. Input Format: The input is a comma-separated list of positive integer pairs (N, k). Output Format: The kth highest factor of N. If N does not have k factors, the output should be 1. Constraints: 1<N<10000000000 1<k<600. You can assume that N will have no prime factors which are larger than 13..arrow_forward
- Write a C line to represent the following equationarrow_forwardcomplete the twelves maximum function in the editor such that given an integer nit returns 12 when n is less than 12 or the value of n when n is greater than 12arrow_forwardQ3:Write a computer programming to determine how many terms are required for the sum of the series 5k2 - 2k, k = 1, 2,3,... to exceed 10,000. What is the sum for this many terms ? (12-arrow_forward
- What does the function return for any positive values of x and n ? The answer should be a general formula in terms of x and n. int what_do_I_do ( int x, int n ) { if ( n = = 1 ) return x; else return x + what_do_I_do ( x, n – 1 ); } C++ be quick pleasearrow_forwardWrite a program to calculate standard daviationarrow_forwardModify program P34_1.cpp to compute the side area, of a cylinder and the area and volume of a sphere, depending on the choice that the user makes. total area, and volume Your program should ask users to enter 1 to choose cylinder or 2 for sphere, and display an "invalid choice error" for other values. For a cylinder, we want to compute: Side area: (2*PI*r) h Total Area: 2*(PI*r2) + Side area Volume: (PI*r2)*h For a sphere, we want to compute: Surface area: 4 *PI*r2 Volume: (4.0/3.0)*PI*r3. Use overloading whenever possible.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr