#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.
There will be a function in it like this: double RectangleArea (double a, double b) { return a*b; }
To find the area and perimeter of a triangle in a C program, you would first need to input the three sides of the triangle. Then, you can calculate the perimeter by adding the three sides together. Next, you can calculate the semi-perimeter by dividing the perimeter by 2. Finally, you can use Heron's formula to calculate the area of the triangle using the semi-perimeter and the three sides. The C program would involve taking user input, performing the necessary calculations, and outputting the results.