fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. double l,b,a,p;
  6. printf("Enter the length of the rectangle \n");
  7. scanf("%f",&l);
  8. printf("Enter the breadth of the rectabgle \n");
  9. scanf("%f",&b);
  10. a=l*b;
  11. p=2*(l+b);
  12. printf("Area = %f \n",a);
  13. printf("Perimeter = %f \n",p);
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 4408KB
stdin
2
3
stdout
Enter the length of the rectangle 
Enter the breadth of the rectabgle 
Area = 0.000000 
Perimeter = 0.000000