In: Computer Science
Write the pseudo code for this problem based on what you learned from the video. The purpose is to design a modular program that asks the user to enter the length and width, and then calculates the area. The formula is as follows:
Area = Width x Length
input code:
output:
code:
#include <iostream>
using namespace std;
int main()
{
/*declare the variables*/
double length,width;
/*take user input*/
cout<<"Enter the length: ";
cin>>length;
cout<<"Enter the width: ";
cin>>width;
/*print output*/
cout<<"Area: "<<length*width;
return 0;
}
pseudocode:
main():
print("Enter the length")
length=take user input
print("Enter the width")
width=take user input
Area=length*width
print("Area",Area)
end