#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;
}
#include<stdio.h> void main() { float length, breadth, area, perimeter; printf("Enter the length & breadth of a Rectangle\n(length breadth): "); scanf("%f %f",&length,&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"); }
Learn c programming and geometry. It will be easy when you know both.
void main() { float pi=3.14,area,perimeter,r=2; area=pi*r*r; perimeter=2*pi*r; getch(); }
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
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
#include<stdio.h> void main() { float length, breadth, area, perimeter; printf("Enter the length & breadth of a Rectangle\n(length breadth): "); scanf("%f %f",&length,&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"); }
Learn c programming and geometry. It will be easy when you know both.
By using that one thing.
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
void main() { float pi=3.14,area,perimeter,r=2; area=pi*r*r; perimeter=2*pi*r; getch(); }
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
It,s easy. a+b+c= perimeter
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
a+b+c
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 >= 0 ie C*C + B*B - 2*B*C >= 0 ie C*C + B*B >= 2*B*C Multiply both sides by 2/C (which is >0 so the inequality remains the same) 2*C + 2*B*B/C >= 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.
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.
There will be a function in it like this: double RectangleArea (double a, double b) { return a*b; }