3. Write a script (name it /opt/book/ scripting /results/exercise3) which:
a. Asks the user for the length and width (in feet) of a rectangular room
b. Calculates the area of the room
c. Displays the result to the user [Show the ouput via screenshot]
Note : You haven't mentioned the script name so i did that question in JavaScript.
I hope this will help for you.
<html>
<head><title>Area of the room</title>
</head>
<body>
<script language="javascript">
var length,width,area;
length=parseFloat(prompt("Enter the length in feet : "));
width=parseFloat(prompt("Enter the width in feet : "));
area=length*width;
document.write("<br>Length :
"+length+"<br><br>");
document.write("Width : "+width+"<br><br>");
document.write("Area of the room : "+area+" Square Feet!!");
</script>
</body>
</html>

3. Write a script (name it /opt/book/ scripting /results/exercise3) which: a. Asks the user for the...
Write, compile, and test a class that displays your first name on the screen. Save the class as Name. Write, compile, and test a class that displays your full name, street address and city, on three separate lines on the screen. Save the class as Address. Write a java program which add two numbers and print the result on screen. Save the class as Add2. Write a java program which accepts two numbers from user multiply them and print the...
matlab
The Homework should be submitted as a script (.m) file Write a script areaMenu that will print a menu consisting of "Cylinder," "Circle," and "Rectangle." It waits for the user to choose from the menu then call the corresponding function of each choice as follows: 1- Cylinder will call the function (cyl) which prompts the user for the radius and height of the cylinder, then calculates and prints area of the cylinder. 2- Circle will call the function (cir)...
In Matlab, write a script which asks a user to input numbers until the user inputs 0. Then the script should print only the positive numbers entered by the user, in reverse order. For example, if the user inputs “4,-1,5,2,-3,-8,0” the script should print “2,5,4”.
Write a script which asks the user to input numbers until the user inputs 0. Then the script should print only the positive numbers entered by the user, in reverse order E.G. if the user inputs '4, -1, 5, 2, -3, -8, 0', the script should print '2, 5, 4'. Please don't copy someone else's answer as they don't work.
CENGAGE MINDTAP gramming Exercise 3-8 PaintCalculator.java Instructions Assume that a gallon of paint covers about 350 square feet of wall space. Create an application with a main() method that prompts the user for the length, width, and height of a rectangular room. Pass these three values to a method that does the following: 1 import java.util.Scanner; 2 public class PaintCalculator { 3 public static void main(String args[]) { // Write your code here public static double computeArea double length, double...
Write a MATLAB script, which asks the user to input the angle xd (in deg) and then approximates sine of the angle using the first 5 terms of Taylor series as follows: n+12n-1 sin n-1 (2n-1)! 1 Note that x in Taylor's equation is in radian, so make sure to do the conversion first Start with defining the vector n=1:5 and then use element-wise operation and basic MATLAB commands to calculate the summation. To calculate the factorial of any number,...
Task 3 [35 marks] Write a MIPS program that does the following (in a correct, user-friendly way): Greets the user, states the purpose of the program Sequentially asks the user to provide integer coefficients A,B,C Calculates discriminant D of quadratic polynomial. (Hint: D = B2 – 4×A×C) Displays the calculated D value Checks (in this order) whether discriminant is: o D = 0? Then, displays: “Quadratic polynomial has a sole root.” o D > 0?...
USE C Programming LANGUAGE ONLY PLEASE. We use <stdio.h> if that helps. For the following problems, create the prototype function, calling function “int main()”, and function. So the function prototype, function call, and function header/body should be seen in the answer. The processor directive is not needed. Show a sample call from the int main() function for all problems. If you can for the first one please show proof that it has no errors. 1. Write a function called DisplayColumbiaUniversity...
Room Class....... in JAVA!!!!! Write a class named Room that has the following fields: Length: Double variable that holds the rooms length(in feet). Breadth: The double variable that holds the rooms breadth(in feet). Height: Double variable that holds rooms height in feet. Color: String object that holds the color you want the room to be painted with. The class should have a constructor to initialize the fields for a particular instance (or object) of the class as given: All double...
Using C++
cs 102 REVIEW LAB Selection a) Minimum/Maximum: Nrite a program that asks the user to enter two numbers. The progzan should use the conditional operator to determine which number is the smaller and which is the larger. Display your output in the format below: The smaller number is: (smallerNumber) The larger number is: ClargerNumber] b) Areas of Rectangles: The area of a rectangle is calculated by maltiplying its length tines its width. Write a program that asks the...