Write a program that takes two integers from user and tells the perimeter of length and width.


Ø Coding of the program



#include<iostream>
using namespace std;
int main()
{
int width,height,area,perimeter;
cout<<"Enter Width of Rectangle = "<<endl;
cin>>width;
cout<<"Enter Height of Rectangle = "<<endl;
cin>>height;
area=height*width;
cout<<"Area of Rectangle ="<<area<<endl;
perimeter=2*(height+width);
cout<<" Perimeter of rectangle are = "<<perimeter<<endl;
cout<<"Student's Roll No:  K-F16-ES-33"<<endl;
return 0;
}




Ø Output of Program

2 comments:

  1. Good efforts ... It's very much helpful ..

    ReplyDelete
    Replies
    1. Thank you Gentlemen for your time to visit us.

      Delete

Total Pageviews