1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/examples/call_v_from_c/test_math.c

15 lines
294 B
C
Raw Normal View History

2022-09-25 22:52:40 +03:00
#include <stdio.h>
extern int square(int i);
extern double sqrt_of_sum_of_squares(double x, double y);
int main()
{
int i = 10;
printf("square(%d) = %d\n", i, square(i));
double x=0.9;
double y=1.2;
printf("sqrt_of_sum_of_squares(%f, %f) = %f\n", x, y, sqrt_of_sum_of_squares(x, y));
}