mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
21 lines
363 B
C
21 lines
363 B
C
#ifdef __cplusplus
|
|
# include <iostream>
|
|
extern "C"
|
|
#else
|
|
# include <stdio.h>
|
|
#endif
|
|
int scalprod(int n, double* x, double* y, double* res);
|
|
|
|
int main()
|
|
{
|
|
double a[5] = { 1., 2., 3., 4., 5. };
|
|
double b[5] = { 2., 3., 4., 5., 6. };
|
|
double rk;
|
|
scalprod(5, a, b, &rk);
|
|
#ifdef __cplusplus
|
|
std::cout << rk << std::endl;
|
|
#else
|
|
printf("%f\n", rk);
|
|
#endif
|
|
}
|