#include <stdio.h> int main() { float sideA, sideB, perimeter; printf("Enter the side A of rectangle: "); scanf("%f", &sideA); printf("Enter the side B of rectangle: "); scanf("%f", &sideB); perimeter = 2 * (sideA + sideB); printf("Perimeter of the rectangle is: %.2f\n", perimeter); return 0; }
int main() {
float sideA, sideB, perimeter;
printf("Enter the side A of rectangle: ");
scanf("%f", &sideA);
printf("Enter the side B of rectangle: ");
scanf("%f", &sideB);
perimeter = 2 * (sideA + sideB);
printf("Perimeter of the rectangle is: %.2f\n", perimeter);
return 0;
}