Write a c++ pseudocode that reads in the width and height of a rectangle, calculates and displays the area and perimeter of the rectangl.
Code:
#include<iostream>
using namespace std;
int main()
{
float width,height,area,perimeter;
cout<<"Input the height of the rectangle :
";
cin>>height;
cout<<"Input the width of the rectangle :
";
cin>>width;
area=(height*width);
perimeter=2*(height+width);
cout<<"The area of the rectangle is :
"<<area<<endl;
cout<<"The perimeter of the rectangle is :
"<<perimeter<<endl;
cout << endl;
return 0;
}
Output:

Code Screenshot:

Write a c++ pseudocode that reads in the width and height of a rectangle, calculates and...
write a program in c ++ that reads the length and width of a rectangle from a file named input.txt and write the area and perimeter of the rectactangle to file named output.txt
JAVA design a class named Rectangle to represent a rectangle. The class contains: A method named getPerimeter() that returns the perimeter. Two double data fields named width and height that specify the width and height of the rectangle. The default values are 1 for both width and height. A no-arg constructor that creates a default rectangle. A constructor that creates a rectangle with the specified width and height. A method named getArea() that returns the area of this rectangle. design...
Design in Python (pseudocode) and implement (source code) a program (name it MyRectangle) that defines the following 3 methods: Method isValid() returns true if the sum of the width and height is greater than 30 Method Area() returns the area of the rectangle if it is a valid rectangle Method Perimeter() returns the perimeter of the rectangle if it is a valid rectangle The main method of MyRectangle prompts the user to enter the width and height of a rectangle...
In pseudocode Write a program which reads in one integer n as input, and then calculates n!, i.e., 1 × 2 × · · · × n, i.e., n-factorial. This is a count-controlled loop.
Within NetBeans, write a Java program for EACH of the following problems. (The Rectangle class) Following the example of the Circle class in Section 9.2, design a class named Rectangle to represent a rectangle. The class contains: · Two double data fields named width and height that specify the width and height of the rectangle. The default values are 1 for both width and height. · A no-arg constructor that creates a default rectangle. · A constructor that creates a...
I need help with
Write an application that allows user to input the height and width of a rectangle. It should output the area and perimeter of the rectangle. Use methods for entering the values, performing the computations, and displaying the results. Results should be formatted with one position to the right of the decimal and printed number aligned in a tabular display.
I'm trying to write a program in C that calculates the area of a rectangle. I need to have a function that gets dimensions from a user and stores them with pointers and addresses and another function that calculates the area... my question is how do i access that values from the dimension function so that I can use it in my calculation and main function.. for example. void userDimensions(float *base, float *height){ scanf("%lf" , base); scanf("%lf", height); } float...
The program must be in C# syntax. Write the definition for a generic class called Rectangle that has data members length and width. The class has the following member functions: setlength to set the length data member setwidth to set the width data member perimeter to calculate and return the perimeter of the rectangle area to calculate and return the area of the rectangle show to return a text to display the length and width of the rectangle sameArea that...
The program must be in C# syntax. Write the definition for a generic class called Rectangle that has data members length and width. The class has the following member functions: setlength to set the length data member setwidth to set the width data member perimeter to calculate and return the perimeter of the rectangle area to calculate and return the area of the rectangle show to return a text to display the length and width of the rectangle sameArea that...
using c++ E2b:Design a class named Rectangle to represent a rectangle . The class contains: (1) Two double data members named width and height which specifies the width and height of the rectangle . (2) A no-arg constructor that creates a rectangle with width 1 and height 1. (3) A constructor that creates a rectangle with the specified width and height . (4) A function named getArea() that returns the area of this rectangle . (5) A function named getPerimeter()...