26 lines
457 B
C
26 lines
457 B
C
/* Rectange Perimeter
|
|
*
|
|
* Rectangle Perimeter is a program that caulculates
|
|
* the perimeter of a rectangle based on the provided
|
|
* length and width.
|
|
*/
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int main() {
|
|
float l, w; /* Length and Width */
|
|
|
|
printf("Rectangle Peremiter\n");
|
|
|
|
printf("Length: ");
|
|
scanf("%f", &l);
|
|
|
|
printf("width: ");
|
|
scanf("%f", &w);
|
|
|
|
printf("Perimeter: %f\n", 2 * (l + w)); /* Peremiter = Length x Width */
|
|
|
|
return 0;
|
|
}
|
|
|
|
|