SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 5 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 13 Nov 2017 My Price 10.00

function that returns the smallest of the three floating-point

#include <stdio.h>
#include "stdafx.h"


// function prototype 
double smallest3(double a, double b, double c);

int main()
{
	printf("%s", "Enter three floating point values: ");
	double x; // first input 
	double y; // second input 
	double z; // third input 
	scanf_s("%lf%lf%lf", &x, &y, &z);

	// determine smallest value 
	printf("The smallest value is %fn", smallest3(x, y, z));
	getchar();
	getchar();

}

// smallest3 returns the smallest of a, b and c 
double smallest3(double a, double b, double c)
{
	double smallest = a; // assume a is the smallest 

	if (b < smallest) { // if b is smaller 
		smallest = b;
	}

	if (c < smallest) { // if c is smaller 
		smallest = c;
	}

	return smallest; // return smallest value 
}

Attachments:

Answers

(5)
Status NEW Posted 13 Nov 2017 10:11 AM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)