Write a program that reads the height h and radius r of Right Circular Cone and finds the surface area and volume where: Volume = (1/3)* Pi *r*h Surface Area Pi *r* sqrt (r+h')
Q: Write a program that reads in the radius of a circle as an integer and prints the circle's diameter,…
A: Actually, program is a executable software that runs on a computer.
Q: Write a program that reads a floating point number and prints "zero" if the number is zero.…
A: Please find the answer below :
Q: Write a program that reads the height h and radius r of Right Circular Cone and finds the surface…
A: As no programming language is mentioned, I am using python. In step 2, you will get the python code.…
Q: Complete this program that tests whether a point (x, y) is inside a circle with radius r whose…
A: The distance between (0,0) and (xp, yp) is given by the Pythagorean theorem as d = sqrt(xp2 + yp2).…
Q: Write a program that computes for the Electric Field and Electric Potential at a given point in a…
A:
Q: Write a program that finds the sum, difference, and product of 2 given numbers.
A: Given: To write code in C++.
Q: Write a C++ program, that asks a user to enter the width and length of the rectangle and then find…
A: Coded using C++ Language.
Q: Write a program that picks four cards from a deck of 52 cards and computes their sum. An ace, king,…
A: program plan: Write a program that picks four cards from a deck of 52 cards computes their sum with…
Q: Write a program that takes all 3 sides of a triangle and prints whether the triangle is equilateral,…
A: Algorithm: Start Input three sides of the triangle from user If side1==side2 and side2==side3 then…
Q: Write a program that finds five prime numbers largerthan Long.MAX_VALUE.
A: Program: //import math package for mathematical operations import java.math.*; public class Main {…
Q: Write a program that displays the area and perimeter of a circle that has a radius of 6.5 using the…
A: Since programming language not mentioned, using python language.
Q: Write a program that accepts two points (see previous problem) and de-termines the distance between…
A: We need to find the distance between two points where we accept the x and y of every point then we…
Q: Write a program that will compute the area of a triangle
A: C program using height and base #include <stdio.h>#include <math.h>double…
Q: Write a program that asks the user to type the coordinate of 2 points, A and B (in a plane), and…
A: Note :-You have not mention the language of the program, so i'm answering your question in C++. Your…
Q: Write a program that prompts the user to enter theside of a hexagon and displays its area. The…
A: Making the given program in Python. Program Approach: Defining a main function within which…
Q: Write a program that reads in the radius and length of a cylinder and computes the area and volume…
A: Given: Write a program that reads in the radius and length of a cylinder and computes the area and…
Q: Write a program that reads the volume, V, as a floating-point number. It then computes and prints…
A: Given, that volume V is a floating-point number which has to be an input by user. Now, considering V…
Q: Write a program that prompts the user to enter the side of a hexagon and displays its area. The…
A: JAVA Code: import java.util.Scanner;import java.lang.Math; public class Main { public static…
Q: write a program that determines the type of triangle (scalene, isosceles, or equilateral)
A: Start input three sides according to condition print the type of triangle stop
Q: Write a program that calculates the number of hours, minutes, and seconds in N seconds. Example: In…
A: The above question is solved in step 2 :-
Q: Write a program that reads two integers, a and b, from the user. Where a is equal to 17 and b is…
A: Note: Below is the required program in the python language. Program Approach: Ask the user to enter…
Q: Write a program that enables the user to drag thevertices of a triangle and displays the angles…
A: Program structure A public class Triang that extends built-in class Application that contains the…
Q: Write a program that reads in the length ofsides of an equilateral triangle and computes the area…
A: Program structure Include header file <stdio.h> to perform input/output operations and…
Q: /Write a program that reads from the user a set of numbers, and first, it has to check how many…
A: Note: Since no programming language is mentioned. I am attempting this in python. if you need it…
Q: Write a program to read temperature in centigrade and determine whether it is Freezing weather or…
A: As no programming language is mentioned, it is solved using basic C++
Q: Write a program that finds summation of all factors of a given number r. For example, the factors of…
A: Algorithm:- for(int i=1;i<=n;i++) { if(n%i==0) sum=sum+i; }…
Q: • write a program that reads two integer values from the user and then prints the Greatest Common…
A: We know that gcd of two number is (a*b)/LCM(a,b), where a and b is given number.
Q: Write a program to compute the area of triangle and if the area is more than or equal to 20 then…
A: Program Approach - Define the function named main(). Declare the variables and initialize them as…
Q: Write a program that takes the x, y coordinates of a point in the Cartesian plane and prints…
A: Note: You didn't mention any languages so i use C language//include the header…
Q: Write a program that computes for the Electric Field and Electric Potential at a given point in a…
A: There are three possible conditions and use if-else if ladder to compare the values of d and r
Q: Write a program that does the following: Let f(x) = In(x) and carry 9 decimal places to find: a) Use…
A: Answer: using System;using System.Collections.Generic;using System.Linq;using System.Text;using…
Q: Write a program (Là and displays, using asterisks, a filled diamond. For example, if the generated…
A: As no programming language is mentioned, we am writing the program in c++ #include…
Q: Write a program which accepts the radius of a circle from the user and compute the area and…
A: Required: To write a program that accepts the radius of a circle from the user and computes the area…
Q: Write a program that reads 3 integers and prints the maximum value among them. (without using max())
A: function main: Start Read num1, num2, num3 if num1 >= num2 and num1 >= num3 then largest =…
Q: that prints out a flood map, showing which of the points in the terrain would be flooded if the…
A: function floodMap():- public static void floodMap(float[][] heights,float waterLevel){ int…
Q: Write a program that prints out first 40 numbers divisible by 3.
A: As you have not mentioned the programing language we are providing the program in Python language.
Q: Write a program that randomly generates an integer between 1and 12 and displays the English month…
A: We create a variable 'num' to store a random number created. We use a switch-case for each num…
Q: Write a program that reads the height h and radius r of Right Circular Cone and finds the surface…
A: In this question, we are asked to create a java program to calculate the surface area and volume of…
Q: Write a program that reads an integer age of kids, finds the maximum of them, and counts its…
A: #include <iostream> using namespace std; int main(){ int…
Q: Create a program that will accept a length value in meters and print its equivalent length in yards.…
A: Programming Language used: C Language C code for the given scenario: #include <stdio.h> int…
Q: Write a program to read three numbers A,B,C then find whether A, the sides of a triangle, if yes…
A: Given :
Q: Write a program that makes a shape of numbers same as the one below, for a number 'x' that is…
A: the below code is in c++. The question is as follows. if the given number is 7 then 1 22 333 4444…
Q: Write a program that calculates the potential energy of 3 charges q1 = 1, q2 = 2, 43 = 3 located at…
A: please do upvote for my efforts thanks! answer: CODE #include…
Q: Write a program that displays all the numbers from 1 to 500, 5 per line, that are divisible by 3 and…
A: A program that displays all the numbers from 1 to 500, 5 per line, that are divisible by 3 and 4.…
Q: Implement a program that requests four numbers from the user. Your program should compute the…
A: Programming language is missing in the question. So we will answer this program in Python language.…
Q: Write a program to read temperature in centigrade and determine whether it is Freezing weather or…
A: Flowchart:
Q: Write a program that asks the user to enter two positive integers, the height and length of a…
A: According to the asked question, the solution is given below with a proper explanation.
Q: Write a program that displays all the numbers from 300 to 400, 5 per line, that are divisible by 3…
A: Since the programming language is not mentioned, so we'll do it in java. The programming methodology…
Q: Write a program that prompts the user to enter the length from the center of a pentagon to a vertex…
A: Program Structure: • Declare double type variables to store side and area of pentagon. • Read…
Pls i need help im using program (netbeans)
Step by step
Solved in 2 steps with 1 images
- Write a program that calculates the equivalent resistance of a circuit. n electrical resistors with resistance values R1, R2,.., Rn are said to be connected in parallel if the same voltage is applied across each. Their equivalent resistance Reg is related to the values R1, R2, ..., Rn by: 1 1 1 1 + +...+ R R R, R. "eq Write a program that prompts the user to enter the resistance of n resistors. The user should be prompted continuously by using a while loop until a zero or negative value is entered (the program should count the number of resistors n entered by the user and store the values in an array). Use another separate loop to print the resistance values entered by the user and the equivalent resistance Reg. Test your program with R1= 1 kn, R2= 2 kn, R3= 4 kQ and R4= 8 kQ.Write a program that helps a company manage salaries of its employees. Your program should ask for the number of hours worked and the hourly rate of an employee than, display the salary. This program should allow the user to enter the information of many employees until enters -1. Sample Run: Enter the number of hours worked (-1 to end): 32 Enter hourly rate of the worker: 100 Balary is 03200 Enter the number of hours Worked (-1 to end) : 40 Enter hourly rate of the worker: 5 Balary is 3200 Enter the number of hours worked (-1 to end): 42 Enter hourly rate of the worker: 10 Salary is 0420 Enter the number of hours worked (-1 to end) : -1(Numerical) Write a program that tests the effectiveness of the rand() library function. Start by initializing 10 counters to 0, and then generate a large number of pseudorandom integers between 0 and 9. Each time a 0 occurs, increment the variable you have designated as the zero counter; when a 1 occurs, increment the counter variable that’s keeping count of the 1s that occur; and so on. Finally, display the number of 0s, 1s, 2s, and so on that occurred and the percentage of the time they occurred.
- Given a square matrix with the elements 0 or 1, write a program tofind a maximum square submatrix whose elements are all 1s. Your programshouldprompt the user to enter the number of rows in the matrix. The program then displaysthe location of the first element in the maximum square submatrix and thenumber of rows in the submatrix. Here is a sample run: Enter the number of rows in the matrix: 5 ↵EnterEnter the matrix row by row:1 0 1 0 1 ↵Enter1 1 1 0 1 ↵Enter1 0 1 1 1 ↵Enter1 0 1 1 1 ↵Enter1 0 1 1 1 ↵EnterThe maximum square submatrix is at (2, 2) with size 3 Your program should implement and use the following method to find the maximumsquare submatrix:public static int[] findLargestBlock(int[][] m)The return value is an array that consists of three values. The first two values arethe row and column indices for the first element in the submatrix, and the thirdvalue is the number of the rows in the submatrix.Please written by computer source Write a program that reads the subtotal and the gratuity rate, then computes the gratuity and total. For example, if the user enters 10 for subtotal and 15% for gratuity rate, the program displays $1.5 as gratuity and $11.5 as total. Sample Run Enter the subtotal and a gratuity rate: 10 15 The gratuity is $1.5 and total is $11.5 Class Name: Exercise02_05veWrite a program that reads an unspecified number of scores (1 99) and displays the following report. Assume that the maximum number of scores is 10. Here is the sample run of the program: Enter ten numbers: 1 23 2 16 5 57 2 8 9 4 (Enter) The number of distinct number is 9 The distinct numbers are: 1,2,3,4,5,6,7,8,9 Below 20%: 1 Between 20% and 50% : 3,4,5 Above 50%: 6,7,8,9 JE
- In Python Write a program that computes the fuel efficiency for a multi-leg journey. The program will first prompt for the starting odometer reading and then get information about a series of legs. For each leg, the user enters the current odometer reading and the amount of gas used (separated by a space). The user signals the end of the trip with a blank line. The program should print the miles per gallon achieved on each leg and the total MPG for the tripModify program P34_1.cpp to compute the side area, of a cylinder and the area and volume of a sphere, depending on the choice that the user makes. total area, and volume Your program should ask users to enter 1 to choose cylinder or 2 for sphere, and display an "invalid choice error" for other values. For a cylinder, we want to compute: Side area: (2*PI*r) h Total Area: 2*(PI*r2) + Side area Volume: (PI*r2)*h For a sphere, we want to compute: Surface area: 4 *PI*r2 Volume: (4.0/3.0)*PI*r3. Use overloading whenever possible.Write a program that reads the employee's name and base salary and then calculates the tax and net amount Salary where: Net salary = Basic salary If the basic salary is less than 500 (no tax) Net salary = basic salary - tax value So that the tax amount is 5% of the basic salary Then it prints the employee's name and net salary %3D 2:40 PM /
- write a program in python Write a program that will allow a student to enter their name and then ask them to solve 10 mathematical equations. The program should display two random numbers that are to be added, such as: 247 + 129 The program should allow the student to enter the answer. The program should then display whether their answer was right or wrong, and accumulate the right values. After the 10 questions are asked, calculate the average that was correct. Then display the student name, the number correct, and the average correct in both decimal and percentage format. In addition to any system functions you may use, you might consider the following functions: A function that allows the student to enter their name. A function that gets two random numbers, anywhere from 1 to 500. A function that displays the equation and asks the user to enter their answer. A function that checks to see if the answer is correct and accumulates the number correct. A function that calculates the…In Python A soup company is interested in finding out how much of their soup will go into various sized cans. The user will input the diameter of the can end, and the height of the can. The volume of a cylinder is the well known formula: volume = area of the ends * height of cylinder. The twist is that a can of soup can not be completely filled to the top; only 95% of the volume can be filled with soup; the remaining 5% must remain empty to allow for expansion. NOTE: when computing the area, use pi to at least 5 significant digits (eg, 3.14159) or use the constant math.pi. You should define a function named soup_volume which takes two parameters, the diameter of the can in cm, and the height of the can in cm, in that order. The function should return a float value, which is the volume of soup that the can is able to hold. The function should not round the value, but when printing the value in the main program, format it to show only 2 decimal places. Example run of the program: Enter…JAVA Given an airplane’s acceleration a and take-off speed v, you can compute the minimum runway length needed for an airplane to take off using the following formula: length = v2 / 2 * a Write a program that prompts the user to enter v in meters/second (m/s) and the acceleration a in meters/second squared ( m/s2 ) , then displays the minimum runway length needed to take off. Here is a sample run: Enter speed and acceleration: 60 3.5 [enter] The minimum runway length for this airplane is 514.286