bsc

Comprehensive codebase and coursework for the 4-year B.Sc. Computer Science Honours degree (WBSU)

git clone https://github.com/notamitgamer/bsc.git
· rebuilt hourlyOpen on GitHub
root / semester_1 / tuition-c / APC-PRAC-001.c

APC-PRAC-001.c (476B)


      1 /* WAP to calculate area and perimeter of a rectangle 
      2 by accepting length and breadth as input. */
      3 
      4 #include<stdio.h>
      5 int main() {
      6     double length, breadth, area, perimeter;
      7     printf("Enter the length and breadth of the Rectangle : ");
      8     scanf("%lf %lf", &length, &breadth);
      9     area = length * breadth;
     10     perimeter = 2 * (length + breadth);
     11     printf("\nArea of the Rectangle : %g"
     12            "\nPerimeter of the Rectangle : %g", area, perimeter);
     13     return 0;
     14 
     15 }