Write a C++ program that inputs the dimensions of the following sections, and then computes and outputs the second moment of inertia for each. 25 em 20 cm 40 em 50 em 2.5 cm ARestangle An I-Seetion
Q: Write a C program to compute the pension of an employee.
A: the code is below step
Q: (f) Write a C program to input the stress and strain from the user and print Elastic potential…
A: Write a C program to input the stress and strain from the user and print Elastic potential energy…
Q: Write a c program that ask a value and display the summation back to the user.
A: Program Approach: Include header file Define the main method Declaring float variables Display the…
Q: A. Write a C++ program to find and print the value of Z using if statement. X = -1 X = 0 X = 1 (X3…
A:
Q: Write a C++ program that determines the magnitude and direction of the resultant. The values of Rx…
A: C++ is one of the most widely used programming languages in the world. The basic structure of C++…
Q: write a program in c++ Language to calculate the volume of cylinder according to this rule: Volume =…
A: - We will write a program in c++ to calculate the volume of Cylinder. - we will use formula :-…
Q: A. Write a C++ program to find and print the value of Z using if statement. X =-1 X = 0 X = 1…
A: Write a c++ program that will find the value of z according to the below conditions, z = x^3 + 5*x^2…
Q: Write a C++ program that enter two numbers (A and B) then check if A is smaller than B, find X-7B/A,…
A: Program: Programs contain the instructions to perform various tasks. The programs are used to…
Q: Write a c++ program to solve the following equation: Z = cos(Vx4 + 5)
A: Actually, c++ is a powerful general purpose language.
Q: Write a C++ program that will compute and print the following: The value of y on this expression: y=…
A: Write a C++ program that will compute and print the following: The value of y on this expression: y=…
Q: Write a C++ program that calculates the areas of a rectangle and of an ellipse.
A: Below is the required C++ program. Program Approach: Including the necessary header files and using…
Q: (c) Write a C program to compute van der Waals' gas constants a and b.
A: In this question we need to create a C program to compute Van der Waals' gas constants a and b.…
Q: Write a C program that calculates Taylor series approximations with first 5 terms for sine and…
A: Solution #include<stdio.h>#include<conio.h> int main(){ int i, n; float x,s,p,…
Q: write C++ program to tead x and complute sin, cos , and tan of x .
A: write C++ program to tead x and complute sin, cos , and tan of x .
Q: Examplel: Write a C++ program that computes the area of rectangle with given (fixed) length and…
A: Please find the answer below :
Q: Write C++ program to compute the value of Z according to the following equations: 6x :x0
A: #include <iostream>#include <math.h> using namespace std; int main(){ float x,Z;…
Q: Write C++ program to compute the following equation: y-3 sin(x) if x>0 tan if x = 0 x + (5x) 2- 10…
A: Sample Response: //C++ program to find the value of Y for given equation Y =…
Q: Write a C++ program to find and print the value of Z using if statement. X = -1 X = 0 X = 1 (X³ +…
A: Algorithm : Step 1 : declare variables. Step 2 : ask for the value of X from user. Step 3 : check…
Q: Write a C++ program that finds the value of W defined by the following equation: ((a + b) – 3)2 W =…
A: Start Input a, b, x, y Calculate w Print w Stop
Q: Write a C program to accept a coordinate point in a XY coordinate system, determine in which…
A: #include <stdio.h> #include <math.h> int main(){int x,y;float…
Q: Write a C program to calculate and display the power (watts) and the current (amps) by obtaining an…
A: #include <stdio.h> int main() { float volt, r = 5; scanf("%f",&volt); float current =…
Q: c++ program to compute the perimeter of a polygon of 'n' sides. The user inputs the starting…
A: C++ Code :- /*header includes i/o filesand standard library of math function*/ #include…
Q: 2. Write a C++ program that find and print the value of S it (X > 0), for the fallowing equation: S…
A: This can be solve with the help of loop. Take input from user , value of n and x. set sum=0;…
Q: Write a C++ program using system of linear equations
A: Here is the source code of the C++ Program to Represent System of Linear Equations in Matrix Form.…
Q: Write a C ++ program to read an angle and determine whether that angle belongs in any square, using…
A: NOTE: SINCE ONLY 90 DEGREES IS PRESENT IN A SQUARE, THE CODE IS CHECKING THE SAME. Define header…
Q: Write a C++ program to compute the circumference of circle, Where: • Circumference of circle = 2 *…
A: PROGRAM CODE: #include <iostream> // include header file for input output…
Q: Write a c# program to take temperature in degree Celsius to kelvin and Fahrenheit
A: formula for conversion. degree celsius to kelving:- kelvin=c+273.15 degree celsius to Fahreinheit…
Q: From the given figure, write a program in C++ LANGUAGE to read the height of cylinder then calculate…
A: In the above problem, we need to read height and radius from user then we check entered height is…
Q: Write a C Program to Accept ten numbers and display sum of even and product of odd numbers
A: C program to solve the given problem is below.
Q: Write a C++ program that computes the following series: .2 x3 x4 x" - - ... 2! 3! 4! n!
A: Given: z= x- x^2/2! + x^3/ 3! - x^4/4! +....x^n/n! if the input is n=3 and x=2 z= 2.66
Q: Write a C++ program to calculate the volume of Sphere.
A: C++ programming language is an object-oriented programming language, it's a cross-platform…
Q: Write a C++ program to get the volume and the area of a cylinder of radius r and height h
A: Given: Write a C++ program to get the volume and the area of a cylinder of radiusr and height h
Q: Write a program in c++ to read the variables of equation and solve it 4 Z=x+y* +y44 y 10+x
A: Program Approach: Include the necessary header files for the standard I/O operations. Declare a…
Q: Write a C++ program to get the volume and the area of a sphere or radius r
A: #include <iostream> using namespace std; int main(){ float r; cout<<"Enter radius:…
Q: Write a C program that calculates the current through each resistor. The code must use a constant…
A: C program: C is a programming language developed by Dennis Ritchie at AT & T Bell Laboratory in…
Q: Write a C# program to enter x from the keyboard (x is double). The program calculates and prints the…
A: The C# program will be created as follows: Create variables Y and x. Input the value of variable x.…
Q: Write a C program to accept a coordinate point in a XY coordinate system and determine in which…
A: #include <stdio.h> int main(){ int x , y; printf("Test Data : "); scanf("%d %d",…
Q: iii) In C# language, write a program to take input three integers x, y, and z and print their…
A: code snippet:
Q: Write a C++ program that compute the area of a circle with a diameter of 10
A: Program Description: To compute the area of a circle with a diameter of 10. Pseudocode: Declare…
Q: Write a C# program that converts feet to meters. The program sh in three-foot increments and the…
A: Note: The program print the equivalent meters of the inputted value along with three increments in…
Q: write a C++ program that calculates the area of an ellipse given its minor and major axis.
A: The given C++ program calculates the area of an ellipse. Import the essential header. Defining the…
Q: Write a C++ program to find and print the value of Z using if statement. (X³ + 5X² Z = 3X/5 .8 X =…
A: #include <iostream> #include <cmath> using namespace std; int main() { int X; //…
Q: "Write a C++ program that will ask the user for the Base and Height measurements of a Triangle in…
A: The answer is as follows Note: As per bartleby rules we have to answer only one question
Q: Write a program in C++ using the loops and functions for summing the following series: S 1/2! - 2/5!…
A: Given Write a program in C++ using the loops and functions for summing the following series: S =…
Q: Write a C++ program that inputs a time in seconds and then converts the time from seconds into…
A: The C++ code is given below: // C++ program to convert seconds into days,…
Q: Write a C++ program to create a calculator using switch case the calculator has 4 operations (+,-,*,…
A: Steps in program: User will be asked to enter option to perform operation. User will be asked to…
Q: Write a C program to solve the following equations: 3 S = -L+ 5KT 4 3.3 R = S - LP 2 6.578 Z = VR -S
A: I have given the code in C along with output screenshot and code screenshot
Q: Write a C++ program that will compute and display the area of a rectangle. The equation used to…
A: Write the C++ program as follows: Create int variables for length, width, and area. Input length…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- (Numerical) Heron’s formula for the area, A, of a triangle with sides of length a, b, and c is A=s(sa)(sb)(sc) where s=(a+b+c)2 Write, test, and execute a function that accepts the values of a, b, and c as parameters from a calling function, and then calculates the values of sand[s(sa)(sb)(sc)]. If this quantity is positive, the function calculates A. If the quantity is negative, a, b, and c do not form a triangle, and the function should set A=1. The value of A should be returned by the function.Hi please Solve in c language. (Wattan Corporation) is an Internet service provider that charges customers a flat rate of $7.99 for up to 10 hours of connection time. Additional hours or partial hours are charged at $1.99 each.Write a function charges that computes the total charge for a customer based on the number of hours of connection time used in a month. The function should also calculate the average cost per hour of the time used (rounded to the nearest 0.01), so use two output parameters to send back these results.You should write a second functionround_money that takes a real number as an input argument and returns as the function value the number rounded to two decimal places. Write a main function that takes data from an input file usage.txt and produces an output file charges.txt. The data file format is as follows:Line 1: current month and year as two integersOther lines: customer number (a five-digit number) and number of hours usedHere is a sample data file and the…Write a function called area circumference generator that takes a radius of a circle as a function parameter and calculates its circumference and area. Then returns these two results as a tuple and prints the results using tuple unpacking in the function call accorrding to the given format. [Must use tuple packing & unpacking] Example1: Function Call: area_circumference_generator(1) Output: (3.141592653589793, 6.283185307179586) Area of the circle is 3.141592653589793 and circumference is 6.283185307179586 ======== :===== Example2: Function Call: area_circumference_generator(1.5) Output: (7.0685834705770345, 9.42477796076938) Area of the circle is 7.0685834705770345 and circumference is 9.42477796076938
- 3. Create a function called (Ysum) that find the value of y from following equation:Question on Grid Navigation In this section, you will investigate the problem of navigation on a two-dimensional grid with obstacles. The goal is to produce the shortest path between a provided pair of points, taking care to maneuver around the obstacles as needed. Path length is measured in Euclidean distance. Valid directions of movement include up, down, left, right, up-left, up-right, down-left, and down-right. Your task is to write a function find_path(start, goal, scene) which returns the shortest path from the start point to the goal point that avoids traveling through the obstacles in the grid. For this problem, points will be represented as two-element tuples of the form (row, column), and scenes will be represented as two-dimensional lists of Boolean values, with False values corresponding empty spaces and True values corresponding to obstacles. Your output should be the list of points in the path, and should explicitly include both the start point and the goal point. Your…In [*]: In [ ]: In [ ]: Problem 5 Write a function that takes a price, adds 8% tax, and returns the total including the tax. Solving problem 4 will help with this problem, but this is a bit different from problem 4. (For example, we are creating a function not a code fragment, and we add the tax no matter what, not depending on add_tax.) To check that your function works, you'll want to call it with some different inputs and see what the results are! 1 #your solution goes here 2 3 price 5000 4 tax_amount=0.08 5 6 7 8 9 def price_with_tax (price): price return price price = price*0.08 1 #make one call to your function here 1 #make another call to your function here 2 # do both calls work correctly when you run them?
- Computer Science Write a scalar function that converts kilograms to pounds and vice versa. Your function should be able to do either calculation based on a parameter value indicating which conversion is needed. The function should not accept negative values.(2) The ceiling of a floating-point number x is the smallest integer that is still larger than or equal to x. Alternatively, the ceiling of a floating-point number x is what you get when you round x up to the nearest integer. For example, the ceiling of 2.1 is 3, the ceiling of 0.9 is 1, the ceiling of -4.5 is -4, etc. Write a function called ceiling (number) to compute the ceiling of a floating-point number (input argument) and returns one integer value. You may not use python's ceil() or floor() functions. Your function may use int() and/or float() functions, and your solution must use the floor division operator (i.e., '//").Problem 1 - Write a function that returns the sum of all the integer numbers dividable by 3 that are smaller than a given integer number. EXAMPLE sum3(20) 63
- Using a relevant example, explain how a function works.a. Consider the Boolean expression ((x 100)) Why is this expression probably not what the programmer intended? b. Write a function that will receive a matrix as an input argument and will calculate and return the overall average of all numbers in the matrix. Use loops, not built-in functions, to calculate the average.in C++ program please: part a) According to Wikipedia: “The International Collegiate Programming Contest, known as the ICPC, is an annual multi-tiered competitive programming competition among the universities of the world.” Moreover, the participants of the contest should be no older than 24. Complete the following function which takes as input two parameters: the current year and the birth year of a student. The function should return the age of the person given the parameters. int calculateAge(int current_year, int birth_year) { part b) The teacher wants to determine if a group of students is eligible for this competition. Complete the following piece of code considering that the age of these students are stored in the studentsAge array and use the calculateAge function to determine the eligibility. Note: solution should use calculateAge ! int main() { int studentsAge[10]; #your answer for (int i = 0; i < 10; i++) { cin >> studentsAge[i]; # your answer Your program…