Untitled
unknown
plain_text
3 years ago
322 B
4
Indexable
#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;
}
}Editor is loading...