User Tools

Site Tools


qna:lab-session:code3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

qna:lab-session:code3 [2024/04/24 15:40] (current)
xallos created
Line 1: Line 1:
 +<code c>#include <stdio.h>
 +#include <math.h>
  
 +double ypoteinousa(double a, double b) {
 +    return sqrt( a*a + b*b );
 +}
 +
 +void proveUnitCycle() {
 +    double f = M_PI / 4;
 +    printf("%lf\n", ypoteinousa(
 +                       sin(f),
 +                       cos(f)
 +                    )
 +           );
 +}
 +
 +int main() {
 +    proveUnitCycle();
 +    return 0;
 +}
 +</code>
qna/lab-session/code3.txt ยท Last modified: 2024/04/24 15:40 by xallos