answersLogoWhite

0


Best Answer

#include <stdio.h>

#include <stdlib.h>

int main(int argc, char *argv){

if(argc != 3){

printf("Gimme two dimensions\n");

}else{

printf("The area is %i\n", (atoi(argv[1]) + atoi(argv[2])) << 1);

}

return 0;

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: C program to find the perimeter of rectangle?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a C program to find the area and perimeter of you square ii rectangle?

#include&lt;stdio.h&gt; void main() { float length, breadth, area, perimeter; printf("Enter the length &amp; breadth of a Rectangle\n(length breadth): "); scanf("%f %f",&amp;length,&amp;breadth); area=length*breadth; perimeter=2*(length+breadth); printf(" Area of the Rectangle=%0.3f\n",area); printf("Perimeter of the Rectangle=%0.3f\n",perimeter); printf("(Press ENTER to exit.)"); getch(); printf("\n"); }


Write a c program to find the area and perimeter of circle?

Learn c programming and geometry. It will be easy when you know both.


How do you find an area of a shape rectangle square and a circle in C program?

By using that one thing.


How do find the length of a rectangle if the perimeter and width is given?

Assuming the object is a rectangular parallelepiped, use its density to find its volume and solve the equation V abc for c where a, b, and c are the height, length and width respectively


What is a c program to find the area and perimeter of circle?

void main() { float pi=3.14,area,perimeter,r=2; area=pi*r*r; perimeter=2*pi*r; getch(); }


How do you do perimeter do you multiply?

Perimeter is the distance around an object. Perimeter of a square = 4x Side length Perimeter of a Rectangle = 2 x Length + 2 x Width Perimeter of a Triangle = A+B+C Perimeter of a circle = 2 pi r


How do you find perimeter of a triangle?

It,s easy. a+b+c= perimeter


Write a program to find the area of circle in c?

PROGRAM TO FIND AREA & PERIMETER OF CIRCLE IN C++#include #include void main(){clrscr();double rad, area, perimeter;coutrad;area=3.14*rad*rad;perimeter=2*3.14*rad;cout


How do you find the perimeter of a trangle?

a+b+c


Show that among all rectangles with area A the square has the minimum perimeter?

Suppose sqrt(A) = B ie the square with sides B has an area of A and its perimeter is 4*B. Now consider a rectangle with sides C and D whose area is A. So C*D = A = B*B so that D = B*B/C Perimeter of the rectangle = 2*(C+D) = 2*C + 2*D = 2*C +2*B*B/C Now consider (C-B)2 which, because it is a square, is always &gt;= 0 ie C*C + B*B - 2*B*C &gt;= 0 ie C*C + B*B &gt;= 2*B*C Multiply both sides by 2/C (which is &gt;0 so the inequality remains the same) 2*C + 2*B*B/C &gt;= 4*B But, as shown above, the left hand side is perimeter of the rectangle, while the right hand side is the perimeter of the square.


How do you write a c program to find area of rectangle using function?

There will be a function in it like this: double RectangleArea (double a, double b) { return a*b; }


How do you find the perimeter?

The formula for finding perimeter of an object is based on the type of geometrical object.Perimeter of a Square = 4L. If one side of a square measures 2 inches then the perimeter of the square is 2 in + 2 in + 2 in + 2 in or 8 inches.lolPerimeter of a Rectangle = 2W + 2L. If the width of a rectangle measures 4 inches and the length measures 2 inches then the perimeter of the rectangle would be 2 in + 2 in + 4 in + 4 in or 12 inches.Perimeter of a Triangle = A + B + C. Literally, this translates to side + side + side.Perimeter of a Circle = Circumference of circle or 2 x Pi x Radius or Pi x Diameter.You can find the perimeter of an object by summing up the lengths of all the sides.