Programming in C
Programming in C
4th Edition
ISBN: 9780321776419
Author: Stephen G. Kochan
Publisher: Addison-Wesley
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 3, Problem 7E

Write a program that evaluates the following expression and displays the results (remember to use exponential format to display the result):

( – –) – –)

Expert Solution & Answer
Check Mark

Explanation of Solution

Program:

The following program will evaluate the given expression.

//include the header file

#include <stdio.h>

//definition of main method

int main (void)

{

//declare the variable

float ans;

//calculate the ans

ans = (3.31e-8f * 2.01e-7f) / (7.16e-6f + 2.01e-8f);

//display the result

printf ("The answer is %e\n", ans);

//return statement

return 0;

}

Explanation:

In the above program, declare the required header file. Inside the main method, declare the variable. Then calculate the “ans” value and print the result on the output screen.

Sample Output

The answer is 9.266027e-10

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
Write a program that plots the sine function, as shown in Figure 5.5a.
What is the postfix notation of the following expression, (A +B*(C-D)/E)*((F+H)*G-W*X)
Translate the statement into equation: When three is multiplied by one less than a number x, the result is 10 less than 5 times the number x.

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Knowledge Booster
Background pattern image
Computer Science
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
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Constants, Variables, Data types, Keywords in C Programming Language Tutorial; Author: LearningLad;https://www.youtube.com/watch?v=d7tdL-ZEWdE;License: Standard YouTube License, CC-BY