Concept explainers
Write a
( – –) – –)
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.
The answer is 9.266027e-10
Want to see more full solutions like this?
Additional Engineering Textbook Solutions
Modern Database Management
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Electric Circuits. (11th Edition)
Starting Out with Python (4th Edition)
Starting Out with C++: Early Objects (9th Edition)
Mechanics of Materials (10th Edition)
- (PYTHON) A Krishnamurthy number is a number which sum of the factorial of its digits is equal to the number itself. For example: Let us consider the number 145. Factorial sum = 1! + 4! + 5! = 1 + 24 + 120 = 145. Therefore 145 is a Krishnamurthy number. Other examples include: 1, 2, 40585. Write a program that does the following: • asks the user to input an integer. • computes whether the number is a Krishnamurthy number. • then finally prints the result. Note: You are not allowed to use the built-in function math.factorial.arrow_forwardPlease take screenshots of the stops. (Science: calculating energy) Write a program that calculates the energy needed to heat water from an initial temperature to a final temperature. Your program should prompt the user to enter the amount of water in kilograms and the initial and final temperatures of the water. The formula to compute the energy is Q = M * (finalTemperature – initialTemperature) * 4184 where M is the weight of water in kilograms, temperatures are in degrees Celsius, and energy Q is measured in joules.arrow_forwardWrite a program that reads non-negative integer number and determines whether it is odd or even or prime?arrow_forward
- (Python) Please write a program that creates steps. You are expected to take in a single positive integer which will be used as the number of steps in your staircase. The program only accepts integers greater than 0 and less than 500. If 0 is entered a message stating "Your staircase has no steps." and if the user enters a value greater than or equal to 500, a message stating "I can't build a staircase that tall." For all other values not within the valid range or not integers an "Invalid staircase size provided." will be displayed to the user. The program will always run only once for each user input. One thing to note, the messages should be the return string from your printSteps() function and printed from the calling function. Additional Requirements: The very first step in the staircase will be left-aligned and for each subsequent level, the step will move above and to the right of the prior step. There are no spaces after the right of any of the steps. The bottom-most row ends…arrow_forward3. Write a Java program that uses a for iteration statement in order to generate and print the sum of numbers from 1 to 1,000 to the output. (2 points)arrow_forward===========Answer question below:=========== - Write program in Java. (Convert infix to postfix) Note: Postfix notation is a way of writing expression without using parentheses. For example, the expression ( 11 + 12 ) * 13 would be written as 11 12 + 13 * Assume that ALWAYS there is a space between operands and operators in the input expression. Use two stacks, one to store the operands and one to store the operators. Your program only accpets following operators : ( ) + - / * Write a method to converts an infix expression into a postfix expression using the following method: String infixToPostfix(String expression) For example, the method should convert the infix expression ( 13 + 25 ) * 34 to 13 25 + 34 * and 20 * ( 10 + 30 ) to 20 10 30 + *. - solution.java: import java.util.*; import java.lang.*; import java.io.*; class InfixToPostfix { public String infixToPostfix(String expression) { } } class DriverMain { public static void main(String args[]) { Scanner input…arrow_forward
- Please help me solve parts a and b in python coding. Include screenshots of your code for better understanding. Thank you :)arrow_forwardUse C# (:Write an app that reads in a 5 digit number and determines if it is a palindrome. A palindrome is a number that reads the same backward as it does forward, for instance: 12321, 44444 or 22722. If the number inputted is not 5 digits long, display an error message and allow the user to input another number.arrow_forwardGiven a and b are int variables and c is a double variable. The initial value for a, b, and c are 8, 4, and 2.5. Show the working steps and result for the following expression:(i) a + b++ - carrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning