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
- 6.use c code to Develop a code that gets two integers from the user and calculates and prints their least common multiplier or LCM. LCM is the smallest number that divides both given integers. Example. lcm (10, 15) = 30, lcm (5,7) = 35 and lcm (12, 24) = 24Hint: we know that lcm(x,y) = xy/gcd(x,y) where gcd is the greatest common divisor (discussed in class). Develop a gcd function in your code, get the two numbers from the user, call your function to calculate their gcd and then use the formula above to calculate and display their lcm GOOD LUCK! Reference This is a list of function prototypes of the C library functions presented in class. You may use any of these functions in your solutions (unless the requirements explicitly indicate otherwise). As you have been provided the function prototypes, you are expected to use the functions correctly in your solutions. double atof(char *string); int atoi(char *string); long atol(char *string); int fclose(FILE *filePointer); char *fgets(char…8. Write a function with one parameter. The function should accept the value of a radius as its argument and return the volume of the sphere with that radius. Note that the radius may be a decimal fraction. The function should not read or print anything.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…
- C++ The function prototype of a function that recieves two integer values and computes their sum and difference is given as follows: void computeSum (int num1, int num2, int & sum, int & diff); write the statments to call this function to compute and print the sum and the differnce of 167 and 84.9. using c++ Write a function daysInMonth that accepts an integer year, and an integer monthNum and returns the number of days in that month. Note that “30 days past September, April, June, and November”, etc. You need to include the year as you have to determine whether it is a leap year in order to decide whether to add 28 or 29 days for Feburary. MonthNum has a value of 1 to 12 with 1 as January and 12 as December. Note that you probably will need to call your isLeapYear function from a previous exercise to be able to write your daysInMonth function.2. If a function have all the default arguments but still some values are passed to the function then _________.
- 4.16 LAB: Toll calculation Toll roads have different fees based on the time of day and on weekends. Write a function calc_toll() that has three parameters: the current hour of time (int), whether the time is morning (boolean), and whether the day is a weekend (boolean). The function returns the correct toll fee (float), based on the chart below. Weekday Tolls Before 7:00 am ($1.15) 7:00 am to 9:59 am ($2.95) 10:00 am to 2:59 pm ($1.90) 3:00 pm to 7:59 pm ($3.95) Starting 8:00 pm ($1.40) Weekend Tolls Before 7:00 am ($1.05) 7:00 am to 7:59 pm ($2.15) Starting 8:00 pm ($1.10) Ex: The function calls below, with the given arguments, will return the following toll fees: calc_toll(8, True, False) returns 2.95calc_toll(1, False, False) returns 1.90calc_toll(3, False, True) returns 2.15calc_toll(5, True, True) returns 1.0536- Consider the following function call: min(x, y) What is the function name and what is the first argument? a. The function name is min and the first argument is x b. Functions in Python don't have names (they're anonymous functions), but the first argument is x. c. The function name is min, but you need to see the function definition to determine the arguments. d. Functions in Python don't have names (they're anonymous functions) and you need to see the function definition to determine the arguments6.21 LAB: Driving cost - functions Write a function DrivingCost() with input parameters milesPerGallon, dollarsPerGallon, and milesDriven, that returns the dollar cost to drive those miles. All items are of type double. The function called with arguments (20.0, 3.1599, 50.0) returns 7.89975. Define that function in a program whose inputs are the car's miles per gallon and the price of gas in dollars per gallon (both doubles). Output the gas cost for 10 miles, 50 miles, and 400 miles, by calling your DrivingCost() function three times. Output each floating-point value with two digits after the decimal point, which can be achieved as follows:printf("%0.2lf", yourValue); Ex: If the input is: 20.0 3.1599 the output is: 1.58 7.90 63.20 Your program must define and call a function:double DrivingCost(double milesPerGallon, double dollarsPerGallon, double milesDriven) #include <stdio.h> /* Define your function here */ int main(void) { /* Type your code here. */ return 0;}
- (a) Write the C++ function, operator+(const Matrix& b) const, which returns the matrix *this + b.6.7 Write a function c_to_f that accepts a temperature in degrees Celsius andreturns the temperature in degrees Fahrenheit. The equation isFor this c++ homework fill in the code Use functions and function declarations (headers) to calculate the payment schedule for a loan. Read from the user: initialLoan, annualInterest, MonthlyPayment Create a loan payment function based on the 3 params above. For each month, print on one line, for each month#: Month, Balance, Payment, PaidOnBalance, Interest, Total Int. Paid Until the monthbalance (currentBalance)<=0 At the end of every year (12 months), draw a line of 65 '$' characters. If the MonthlyPayment < 1st month's monthlyInterest, reject the payment code: #include <iostream>using namespace std; // make a header here for drawline // make a function called printLoanPayments that// takes in the loanAmount, annualInterest, and monthly payment// (each of the above are doubles) // print a header for multiple columns// convert annualInterest to monthly interest // keep updating the current balance// keep updating the total Interest paid// calculate the…