Write a java program to find the third angle of a triangle after taking two angles from user.
Q: write a Java program below - Find the area of the circle -Find the average -Find the Sum
A: We know that, area of circle = pi*r*r average = sum of all numbers / total numbers I have provided…
Q: Write a java code to get the kinetic energy of rotation after taking moment of inertia and angular…
A: Required:- Write a Java Code to get the kinetic energy of rotation after taking a moment of inertia…
Q: Write a java code to get the number of electrons passing through a heater wire in one minute, if it…
A: import java.util.*; public class Main{ public static void main(String[] args) { double current =…
Q: Write a java program which accepts input from user and draw a lines one in blue color and then…
A: Sample Response: //include required packagesimport java.util.Scanner;import java.awt.Color;import…
Q: Create a simple Java Program to Check Whether a Number is Even or Odd
A: simple Java Program to Check Whether a Number is Even or Odd Program: import java.util.Scanner;…
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 Java program to find the speed of transverse wave on string after taking tension and mass…
A: According to the information given:- We have to calculate the speed of the transverse wave on string…
Q: Write a java program to print the flag of America.
A: I have answered this question in step 2.
Q: Write a Java code to get the velocity of efflux of water flowing from a hole at a height h from…
A: Required:- Write a Java code to get the velocity of efflux of water flowing from a hole at a height…
Q: Write java program to read one integer number as square side then display the square area if the…
A: if(side >0) { System.out.println("Area of square with side "+side+" is…
Q: .Write a program: How to find odd number between 100 to 500 in java
A: import java.util.*; // Compiler version JDK 11.0.2 class Dcoder{ public static void main(String…
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: d) Write a JAVA program to read input the length(in cm) of the side of a regular hexagon and print…
A: Please find the answer below
Q: Write a program in java to calculate the area of circle.
A: Program Approach – Import the essential packages. Declare the class. Define the main method.…
Q: Write a java program to print the following pattern: * *** ***** ******* *********…
A: Code: import java.util.Scanner; public class Main { public static void main(String args[]) { int…
Q: Write a java program to find the distance travelled by a car by taking the speed and time
A: As given, I need to write a Java program that takes speed and time as input and find distance. The…
Q: Write a Java program to print the first 20 positive odd numbers using a loop
A: For this problem statement, I used a do-while loop. In this loop check number is odd or not using if…
Q: Write a java program to get the right angled triangle from the user entered rows. Using * symbol
A: Given: To write a java program to get the right angled triangle from the user entered rows. Using *…
Q: Write Java code to repeatedly print each single digit from 9 down to 1 the number of times based…
A: Step 1 : create a driver function Step 2 : create a loop int i = 9 till i >= 1; i-- Step 3 :…
Q: Write a java program to find the recoil momentum of the atom of an isolated hydrogen atom emits a…
A: Required:- Given the atomic number of atom: 5 and we have to find the energy required to remove the…
Q: Write a java program to display fibonacci series upto 100 as a given number.
A: Given question is asking for the java program to display the Fibonacci series upto 100 number.…
Q: Write a java program to find the circumference of the orbit of revolving electron_after taking the…
A: Start input number of orbit input wavelength calculate circumference = n*wavelength display…
Q: Write a Java program to find and print the first 10 happy numbers.
A: Given: Write a Java program to find and print the first 10 happy numbers.
Q: Write a java program to find the arc length after taking angle and radius of arc from user.
A: Required:- Write a JAVA program to find the arc length after taking the angle and radius from the…
Q: Write a program in java to find the semi perimeter of rectangle and take breadth and length from use
A: perimeter of rectangle is 2(l+b) semi perimeter of rectangle is half of perimeter that is (l+b)…
Q: Write a java program to take the string and word from user and check whether the string starts with…
A: startsWith is the method in java available in String class to check whether the given string starts…
Q: Write a java program to find the plane angle after taking the arc length and amd radius from the…
A:
Q: Write a Java program to get the mobility after taking magnitude of drift velocity per unit electric…
A: Required:- Write a Java program to get the mobility after taking the magnitude of drift velocity per…
Q: Write a java program to find the moment of inertia of a circular ring about an axis perpendicular to…
A: Required:- Write a java program to find the moment of inertia of a circular ring about an axis…
Q: Write a program in JavaScript to convert tem- perature from Celsius to Fahrenheit and vice versa or…
A: In this program we are asked to write a javascript code for the given conversions Algorithm…
Q: Write a java program to find the radius of a Gyration of a cube about an axis passes through the…
A: With the help of radius of gyration, the moment of inertia can be determined. Radius of a Gyration…
Q: Write a java program to find the perimeter of circle after taking radius from user
A: Write a program using java which to find the perimeter of the circle.
Q: Write a Java program to print the alphabet 'L' as shown below: # # # # ####
A: Write a Java program to print the alphabet 'L' as shown below: ######## Approach: In the given…
Q: Write a Java Program below Get the value from a user? - Find the Area Of Circle - Find the Average…
A: Please find the answer below
Q: Write a program in JavaScript to check a number is even or odd. And the number is given
A: Required:- Write a program in JavaScript to check a number is even or odd. And the number is given…
Q: Write a java program to find the area of square, rectangle and circle using the method over loading.…
A: Required:- Write a Java program to find the area of a square, rectangle, and circle using the method…
Q: Write a Java program that print out its own text.
A:
Q: Write a java program by taking radius of circle, length and breadth of rectangle, side of square and…
A: Write the java program as follows: Declare the required variables for the radius of the circle,…
Q: Create a simple Java Program to Find all Roots of a Quadratic Equation
A: Program: import java.util.Scanner;public class Main { public static void main(String[] args) {…
Q: Write a java code to get the kinetic energy of rotation after taking angular momentum and angular…
A: Required:- Write a Java Code to get the kinetic energy of rotation after taking angular momentum and…
Q: Write a program in java to take the value of x from user and find the value of 2*x^3 -3x^2+ 5*x+ 16…
A: import java.util.*; public class HelloWorld{ public static void main(String []args){…
Q: Write a Java program to input the length and width of a rectangle and check whether the rectangle is…
A: Below is the code in java and sample output:
Q: Write a java program to print the Floyd's triangle after taking the number of rows from the user.
A: Given: To write java program to print Floyd's triangle after taking number of rows from user.
Q: Write a java program to find the number of vowels, consonents, digits and white space characters in…
A: Import the util. Scanner package. Inside main() function create Scanner class object. Prompt user…
Q: Write a program in JavaScript to check a number is positive, negative or zero. The number is given
A: Required:- Write a program in JavaScript to check a number is positive, negative, or zero. The…
Q: Write a JAVA program to print all uppercase alphabets from 'K' to 'Z' using a while loop.
A: Uppercase letters are the capital letters i.e the bigger, taller version of letters as opposed to…
Q: Write a java program to find the horizontal range that a particle can cover after taking speed of…
A: Required:- Write a java program to find the horizontal range that a particle can cover after taking…
Q: Write a java program to implement the following Shape Use Combobox to choose the shape n must be…
A: Answer : #include<graphics.h> #include<conio.h> void main() { intgd=DETECT, gm,…
Q: Write a java code to get a square star pattern after taking the height of square from user
A: Given:
Q: Write a java program to get the curved surface area of the cube after taking side from user.
A: Required:- write a java program to get the curved surface area of the cube after taking the side…
Step by step
Solved in 3 steps with 2 images
- Write a program in java to check whether a string is a rotation of another. Take both string from user.Write a Java program using at least one for loop that prints pictures of piles of counters of different sizes using ‘=‘ characters as shown below. Each counter should be an odd number of characters wide and be two characters longer than the counter above it. The user should, when asked, type in the size of the top and bottom counters. For example, if the user enters 3 for the top counter and 7 for the bottom counter then the image below should be printed. your program must make use of a counter-controlled for loop be in procedural programming style (not OOP) your program should also be logically correct, solving the core problem, be elegantly written following good style, and be broken into appropriate methods that take arguments and/or return results.Asap
- An isolated hydrogen atom emits a photon of x eV. Your task is to find the momentum of photon emitted after taking x from user in javaWrite a program that draws a square fractal. Fractals are images that keep repeating their own image in ever-smaller versions. There exists numerous fractals and some fractals rely on computation of advanced mathematics. All fractals have a recursive quality and provide an ideal platform for practicing recursive concepts. You will note that from the four corners of the center rectangle, smaller rectangles are drawn and each rectangle in turn continues to draw three smaller rectangles until the rectangle is the size of one pixel. A CODE TEMPLATE & PICTURE OF OUTPUT IS ALREADY PROVIDED IN THE ATTACHED PICTURES Method drawSquare1 gets the ball rolling and draws a solid rectangle in the center of the screen. The initial rectangle needs to be 1/4 the size of the monitor. This explains why it is important to know the screen resolution and why this information is passed by parameter. Method drawSquare1 needs to make four method calls to draw each one of the four rectangles attached to…Write a program that draws a square fractal. Fractals are images that keep repeating their own image in ever-smaller versions. There exists numerous fractals and some fractals rely on computation of advanced mathematics. All fractals have a recursive quality and provide an ideal platform for practicing recursive concepts. You will note that from the four corners of the center rectangle, smaller rectangles are drawn and each rectangle in turn continues to draw three smaller rectangles until the rectangle is the size of one pixel.
- Write a Java program that asks the user to enter positive numbers, and store it into (myArray) of type int. Use any letter as a sentinel. Show the sum of all the numbers, total number of numbers and their average.Write an application in java that prints the sum of cubes. Promptfor and read two integer values and print the sum of eachvalue raised to the third power.Write a program that reads two matrices of integers. It then generates the sum, difference and productof the two matrices.The sum of the two matrices of the same size is a matrix with elements that are the sums of thecorresponding elements of the two given matrices. Addition is not defined for matrices of different sizes.If A and B are matrices of the same size, then we define subtraction as follows: A – B = A + (-B). Thus, tosubtract matrix B from matrix A, we simply subtract corresponding elements.To multiply a matrix by another matrix we need to do the "dot product" of rows and columns. The "DotProduct" is where we multiply matching members, then sum up:(1, 2, 3) • (7, 9, 11) = 1×7 + 2×9 + 3×11 = 58We match the 1st members (1 and 7), multiply them, likewise for the 2nd members (2 and 9) and the3rd members (3 and 11), and finally sum them up.
- Write a program that reads two matrices of integers. It then generates the sum, difference and productof the two matrices.The sum of the two matrices of the same size is a matrix with elements that are the sums of thecorresponding elements of the two given matrices. Addition is not defined for matrices of different sizes.If A and B are matrices of the same size, then we define subtraction as follows: A – B = A + (-B). Thus, tosubtract matrix B from matrix A, we simply subtract corresponding elements.To multiply a matrix by another matrix we need to do the "dot product" of rows and columns. The "DotProduct" is where we multiply matching members, then sum up:(1, 2, 3) • (7, 9, 11) = 1×7 + 2×9 + 3×11 = 58We match the 1st members (1 and 7), multiply them, likewise for the 2nd members (2 and 9) and the3rd members (3 and 11), and finally sum them up.Use the following definitions:#define ROW 6#define COL 6void add (int matrixResult[] [COL], int matrixA[] [COL], int matrixB[][COL],int row, int…Computer Science Write a Java program that reads a line and a line segment and then determines whether they intersect or not. When they overlap completely, consider that as intersecting. Use variables ((lp1x, lp1y), (lp2x, lp2y)) to represent a line and ((sp1x, sp1y), (sp2x, sp2y)) to represent a line segmentWrite a code in Java Programming Your task is to simulate a coffee shop using the observer pattern (do not use the deprecate one). The coffee shop serves two types of coffee: espresso and cappuccino. The shop has two baristas, EspressoBarista and CappuccinoBarista. EspressoBarista generates random espresso orders between 1 and 3 every 2 seconds, while CappuccinoBarista generates random cappuccino orders between 1 and 3 every 3 seconds. The UML design diagram is shown below. Property ChangeListenerfac Observablenerfacto Coffeeshop HashMap Sting, integer> ingredients ExpresssCartate The CoffeeShop class holds the current stock of ingredients and the CoffeeShop constructor initializes the count for each ingredient. The required ingredients for each type of coffee are as follows: • Espresso: 1 shot of espresso, 1 ounce of milk Cappuccino: 1 shot of espresso, 2 ounces of milk, 1 ounce of foam If an order cannot be fulfilled because there are not enough ingredients, a warning message…