Develop a C program that prompts the user to enter radius (r), height (h), slant height (s) of a conic, and computes the volume (V) and surface area (4).
Q: you have to create a program in C language in which the user enters the mass M and radius L of a…
A: Algorithm: 1. Read mass, m. 2. Read radius, r. 3. moment_of_inertia = (m * r * r) / 2. 4. Print…
Q: Project a. You have to create a program in C language in which the wsen enters the maas M and radius…
A: Algorithm: 1. Read mass, m. 2. Read radius, r. 3. moment_of_inertia = (m * r * r) / 2. 4. Print…
Q: Write a C program that will ask the user to enter the lengths of a femur bone and a humerus bone…
A: Required:
Q: CREATE A C++ PROGRAM THAT THE USER WILL INPUT 3 NUMBERS (MONTH, DAY AND YEAR) AND THE OUTPUT IS TO…
A: #include<iostream> using namespace std; bool isLeap(int year) { return (((year % 4 == 0)…
Q: Write a C++ program to develop following shapes or pattern by using nested loop. Give source code…
A: According to the guideline, I can answer only one question. I am printing the shape of a hollow half…
Q: Write a C program to compute the Perimeter of a right-angle triangle The values of the Base, Height…
A: As given, we need to write a C program that takes Base, Height and slope of a right-angle triangle…
Q: 4. Write a C++ program to calculate the value of distance, in miles, given this relationship:…
A: #include <iostream>using namespace std;int main(){ double…
Q: You have to create a program in C language in which the user enters the mass M and radius of a…
A: Coded using C language.
Q: Write a complete C program that prompts the user for the coordinates of two 3-D points ( xl , yl,…
A: Program: #include <stdio.h> #include <math.h> int main(void) { double x1, x2, y1,…
Q: Write a C++ program that computes the shaded area in the figure below using the function carea().…
A: To compute shaded area, logic is to subtract smaller area from bigger area . Enter two radius by…
Q: You have to create a program in C language in which the user enters the mass m and radius & of a…
A: Moment of inertia of a disk about its axis perpendicular to the plane - MR^2/2 M=mass R=Radius
Q: Write a C++ program that allows the user to input a temperature value in Celsius and prints the…
A: Note: Comments have been added in the source code itself to have a better understanding of the code.…
Q: You have to create a program in C language in which the user enters the mass m and radius R of a…
A: Algorithm: 1. Read mass, m. 2. Read radius, r. 3. moment_of_inertia = (m * r * r) / 2. 4. Print…
Q: You have to create a program in C language in which the user enters the mass M and radius R of a…
A: Given To know about the moment of inertia in C language program
Q: Create a c++ program that will calculate the following formulas and the user will choose if the…
A: Program description : The c++ program that allows user to select the process type whether to find…
Q: Project a. You have to create a program in C language in which the wsen enters the mass M and radius…
A: Algorithm: 1. Read mass, m. 2. Read radius, r. 3. moment_of_inertia = (m * r * r) / 2. 4. Print…
Q: You have to create a program in C language in which the wsen enters the maos M and radiusl of a…
A: Algorithm: 1. Read mass, m. 2. Read radius, r. 3. moment_of_inertia = (m * r * r) / 2. 4. Print…
Q: Create a C program that will dispay centimeters to inches conversion table. - The smallest and…
A: Answer : Centimeter to inches Conversion: #include<stdio.h>int main(){ int small,large;…
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: fou have to create a program in C language in which the user enters the mass M and radius of a…
A: Algorithm: 1. Read mass, m. 2. Read radius, r. 3. moment_of_inertia = (m * r * r) / 2. 4. Print…
Q: i) Write a C program to input your student ID, and GPA from keyboard and display with headings.…
A: Programs: Programs contain certain lines of code, that contain the instructions. The instructions…
Q: You have to create a program in C language in which the user enters the mass mand radius R of a…
A: Introduction: A physical quantity that quantifies a body's resistance to having its speed of…
Q: You have to create a program in C language in which the user enters the mass m and radius R of a…
A: Algorithm: 1. Read mass, m. 2. Read radius, r. 3. moment_of_inertia = (m * r * r) / 2. 4. Print…
Q: 4. Write a C program in which the user can input the radius of two soap bubbles in contact and the…
A: Write a C program in which the user can input the radius of two soap bubbles in contact and the…
Q: Write a C++ program that displays the results of the expressions 15 / .4, 15 % 4, and 5 * 3 - (6 *…
A: Problem. Write a C++ program that displays the results of the expressions 15 / 4, 15 % 4, and 5 * 3…
Q: You have to create a program in C language in which the user enters the mass m and radius of a…
A: Algorithm: 1. Read mass, m. 2. Read radius, r. 3. moment_of_inertia = (m * r * r) / 2. 4. Print…
Q: Write a C++ program that will display a table of trigonometric functions: sin x, cos x, and tan x…
A: According to the information given;- We have to follow the instruction to get desired outcome.
Q: you have to create a program in C language in which the user enters the mass M and radius R of a…
A: Algorithm: 1. Read mass, m. 2. Read radius, r. 3. moment_of_inertia = (m * r * r) / 2. 4. Print…
Q: Write a c program that display the water invoice price on the screen as follows, according to the…
A: Program code: // Include necessary header files #include <stdio.h> // Define a main function…
Q: Write a C++ program that calculates the base of a polygon (1e., b). The main function asks the user…
A: Program Approach: Include the necessary header files for the standard I/O operations. Declare the…
Q: Write a C++ program that computes and display the final grade of the student based on the three…
A: #include<iostream> using namespace std; int main(){ int percentage; cin >>…
Q: 5. Write a C program in which the user can input the radius of two soap bubbles that combine to form…
A: Write a C program in which the user can input the radius of two soap bubbles that combine to form a…
Q: Write a C++ program that calculates the Volume of a Triangular Prism. The main function asks the…
A: #include <iostream> using namespace std;//function declarationint Volume(int a, int b, int h){…
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: Write a c program to calculate velocity of a car when distance and time are given by the user.
A: C program to calculate the velocity of a car. Prompt the user to enter the distance. Prompt the user…
Q: c++ program with total change amount as an integer input and output the change as the fewest coins.…
A: Required: write a c++ program with total change amount as an integer input and output the change as…
Q: You have to create a program in C language in which the user enters the mass m and radius & of a…
A: Introduction: The program can be coded in C language. For that we need to know the formula of:…
Q: Write a C++ program to display if the student is in Elementary level, High School level, or College…
A: C++ used to answer this question
Q: you have to create a program in C language in which the woen entero the mass M and radiws ł of a…
A: Algorithm: 1. Read mass, m. 2. Read radius, r. 3. moment_of_inertia = (m * r * r) / 2. 4. Print…
Q: You have to create a program in C language in which the user enters the mass m and radius of a…
A: Coded using C language.
Q: Write a C++ program that calculates the Diagonal of a Square. The main function asks the user to…
A: Diagonal of a Square=side* square root of 2 Algorithm 1. In main take side length of square from…
Q: Code a C program that will prompt the user to input x-y coordinate of a point in a Cartesian plane.…
A: #include <stdio.h> void main(){ int x, y; printf("Enter the values for X and Y\n");…
Q: REATE A C++ PROGRAM THAT THE USER WILL INPUT 2 COORDINATES TO REPRESENT A LINE IN A CARTESIAN PLANE…
A: Algorithm: Start Read x1,x2,y1,y2 values If y2-y1 is 0, print "VERTICAL LINE" Else if x2-x1==0…
Q: Write a C program that takes as input marks of five subjects MOD2A, ETN2A, Physics 2A, Calculus 2A,…
A: Read the marks Calculate the percentage Check the grade Print all details
Q: Write a complete C++ program to have a user enter a temperature and then determine If water would…
A: check three conditions: - if userInput >212 display “greater than boiling point” else if…
Q: You have to create a program in C language in which the user enters the mass M and length L of a…
A: To Do: A rod's moment of inertia around an axis passing through its centre and perpendicular to it…
Q: You have to create a program in C language in which the user enters the mass m and radius of a…
A: Algorithm: 1. Read mass, m. 2. Read radius, r. 3. moment_of_inertia = (m * r * r) / 2. 4. Print…
Q: Write a C++ program that displays the results of the expressions 15 / * .4, 15 % 4, and 5 * 3 - (6 *…
A: Given: Write a C++ program that displays the results of the expressions 15/.4 , 15%3 , and 5*3-(6*4)
Q: Write a C program to convert Kilometer to meter, centimeter, millimeter.
A: Q. Write a C program to convert Kilometer to meter, centimeter, millimeter. Answer. Below is a C…
Q: Create a c program that gives the user to display the sum of the first and second numbers,…
A: Required: Create a c program that gives the user to display the sum of the first and second numbers,…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- (Data processing) Years that are evenly divisible by 400 or are evenly divisible by 4 but not by 100 are leap years. For example, because 1600 is evenly divisible by 400, 1600 was a leap year. Similarly, because 1988 is evenly divisible by 4 but not by 100, it was also a leap year. Using this information, write a C++ program that accepts the year as user input, determines whether the year is a leap year, and displays a message telling the user whether the entered year is or is not a leap year.(Statistical) In many statistical analysis programs, data values considerably outside the range of the majority of values are simply dropped from consideration. Using this information, write a C++ program that accepts up to 10 floating-point values from a user and determines and displays the average and standard deviation of the input values. All values more than four standard deviations away from the computed average are to be displayed and dropped from any further calculation, and a new average and standard deviation should be computed and displayed.(Computation) Among other applications, Pascal’s triangle (see Figure 7.22) provides a means of determining the number of possible combinations of n things taken r at a time. For example, the number of possible combinations of five people (n = 5) taken two at a time (r=2)is10. Each row of the triangle begins and ends with 1. Every other element in a row is the sum of the element directly above it with the element to the left of the one above it. That is, element[n][r]=element[n1][r]+element[n1][r1] Using this information, write and test a C++ program to create the first 11 rows of a twodimensional array representing Pascal’s triangle. For any given value of n less than 11 and r less than or equal to n, the program should display the correct element. Use your program to determine in how many ways a committee of 8 can be selected from a group of 10 people
- (Conversion) a. Write a C++ program to convert meters to feet. The program should request the starting meter value, the number of conversions to be made, and the increment between metric values. The display should have appropriate headings and list the meters and the corresponding feet value. If the number of iterations is greater than 10, have your program substitute a default increment of 10. Use the relationship that 1 meter = 3.281 feet. b. Run the program written in Exercise 6a on a computer. Verify that your program begins at the correct starting meter value and contains the exact number of conversions specified in your input data. c. Modify the program written in Exercise 6a to request the starting meter value, the ending meter value, and the increment. Instead of the condition checking for a fixed count, the condition checks for the ending meter value. If the number of iterations is greater than 20, have your program substitute a default increment of (ending value - starting value) / 19.(Civil eng.) Write a C++ program to calculate and display the maximum bending moment, M, of a beam that’s supported on both ends (see Figure 3.8). The formula is M=XW(LX)/L, where X is the distance from the end of the beam that a weight, W, is placed, and L is the beam’s length. You program should produce this display: The maximum bending moment is xxxx.xxxx The xxxx.xxxx denotes placing the calculated value in a field wide enough for four places to the right and left of the decimal point. For your program, assign the values1.2,1.3,and11.2toX,W,andL.(Numerical) a. Write a C++ program that accepts an integer argument and determines whether the passed integer is even or odd. (Hint: Use the % operator.) b. Enter, compile, and run the program written for Exercise 8a.
- 4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer from a local nursery. The nursery carries different types of vegetable fertilizers in various bag sizes. When buying a particular fertilizer, they want to know the price of the fertilizer per pound and the cost of fertilizing per square foot. The following program prompts the user to enter the size of the fertilizer bag, in pounds, the cost of the bag, and the area, in square feet, that can be covered by the bag. The program should output the desired result. However, the program contains logic errors. Find and correct the logic errors so that the program works properly. // Logic errors. #include #include using namespace std; int main() { double costs double area; double bagsize; cout > bagsize; cout > cost; cout > area; cout << endl; cout << "The cost of the fertilizer per pound is: $" << bagsize / cost << endl; cout << "The cost of fertilizing per square foot is: $" << area / cost << endl; return 0; }C++ Programming Exercise: A real estate office handles, say, 50 apartment units. When the rent is, say, $600 per month, all the units are occupied. However, for each, say, $40 increase in rent, one unit becomes vacant. Moreover, each occupied unit requires an average of $27 per month for maintenance. How many units should be rented to maximize the profit? Write a program that prompts the user to enter: a. The total number of of units. b. The rent to occupy all the units. c. The increase in rent that results in a vacant unit. d. Amount to maintain a rented unit. The program then outputs the number of units to be rented to maximize the profit.In c++ program: Wite a program to print the perimeter of polygons.NB: A polygon is a plane figure that is bounded by a connected finite number of straight-linesegments. Example: Pentagon, Hexagon, etc1. An interactive program to choose the type of polygon, accept the length of the side in millimetres.2. Calculate the perimeter of the chosen polygon3. Display the name of the polygon, the length of the side, and the perimeter of thepolygon.The formula for calculating the perimeter of a Polygon:Perimeter = (number of sides) × (length of one side) The solution for each question should have the following components.i. Algorithmii. Pseudocodeiii. Flowchart
- (C++) A robot is initially located at position (0, 0) in a grid [−5, 5] × [−5, 5]. The robot can move randomly in any of the directions: up, down, left, right. For each move, print the direction of the move and the current position of the robot. If the robot makes a circle, which means it moves back to the original place, print “Back to the origin!” to the console and stop the program. If it reaches the boundary of the grid, print “Hit the boundary!” to the console and stop the program. A successful run of your code may look like: Down (0,-1) Down (0,-2) Up (0,-1) Left (-1,-1) Left (-2,-1) Up (-2,0) Left (-3,0) Left (-4,0) Left (-5,0) Hit the boundary! or Left (-1,0) Down (-1,-1) Right (0,-1) Up (0,0) Back to the origin!1) Write a c++ program that calculates the cost of 3 bags of fruit. The 4 possible fruits arepears which cost 1 dollar each, pomegranites which cost 2 dollars each, plumbs whichcost 3 dollars each, and bananas which cost 5 dollars each. Each bag can contain anynumber of different fruits with any quantity of each particular fruit. The program willprompt the user to enter a particular fruit by typing the name of the fruit: .‘pear’ forpears, ‘pomegranite” for pomegranites, ‘plumb’ for plumbs, and ‘banana” for bananas,and then prompt for the quantity of that fruit that will be placed in the bag. The programwill then continue to prompt the user in the same manner for more fruit to be placed inthe same bag until the user types the word ‘done’. This will then cause the program tohave the user enter the various quantities of fruit for the next bag. When the user hasentered the varieties of fruit in all 3 bags, the program will display the total cost of fruitper bag and the overall cost for all…Design by C++ Using subroutines (VOID) write a program to perform numerical integration of f(x)=x^2*sin(x)*exp(x^2) over x=[0,Pi] having a choice of (i) rectangular rule (ii) the Simpson’s rule Divide the domain into N subsections, where N=5,10,20,40. Compare your results.