Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
322 B
0
Indexable
Never
#include <iostream>
#include <cmath>
using namespace std;
void func(float* a,float x) {
	for (float i = 0; i < 100; i++)
	{
		*a = sin(x * i);
		*(a++);
	}
}
int main()
{
	float x = 0.001;
	float a[100];
	float *a_pnt = a;
	func(a_pnt, x);
	for (int i = 0; i < 100; i++)
	{
		cout << a[i] << endl;
	}
}