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-010.c

APC-PRAC-010.c (443B)


      1 /* WAP to calculate and display the valve of the given expression :
      2  (1/a^3) + (1/(b+2)^3) + (1/(c^4 + root(2)))
      3  take a, b, c as input.
      4 */
      5 
      6 #include <stdio.h>
      7 #include <math.h>
      8 int main()
      9 {
     10     double a, b, c, result;
     11     printf("Enter the value for a, b and c : ");
     12     scanf("%lf %lf %lf", &a, &b, &c);
     13     result = (1 / pow(a, 3)) + (1 / pow((b + 2), 3)) + (1 / (pow(c, 4) + sqrt(2)));
     14     printf("\nResult = %g", result);
     15     return 0;
     16 }