Ask Question
30 April, 23:05

Write a program that reads in the length and the width of a rectangular yard. your program should compute the time required (in minutes) to cut the grass at the rate of 2.3 square meters a second

I just want to know the equation that i need

+1
Answers (1)
  1. 30 April, 23:27
    0
    import javax. swing.*;

    public class Grass { public static void main (String[]args) { / / Variable declarations String gd; Double st, st2, st3, st4, time; for (int i=1; i<=5; i++) { / / Get user input gd = JOptionPane. showInputDialog ("Enter the length of yard"); st = Double. parseDouble (gd); st2 = Double. parseDouble (JOptionPane. showInputDialog ("Enter the width of yard")); st3 = Double. parseDouble (JOptionPane. showInputDialog ("Enter the length of house")); st4 = Double. parseDouble (JOptionPane. showInputDialog ("Enter the width of house")); / / Calculate time = (st * st2 - st3 * st4) / 2.3; / / Display the result System. out. println ("The time required (in minutes) to cut the grass: "+time); } } / / end of main } / / end of grass
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write a program that reads in the length and the width of a rectangular yard. your program should compute the time required (in minutes) to ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers