Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
413 B
0
Indexable
Never
#include <iostream>
#include <cmath>
#include <fstream>
using namespace std;

void f(double* mass)
{
    double x;
    for (int i = 0; i < 100; i++)
    {
        x = 0.001 * i;
        *mass = sin(x);
        *mass++;
    }
}

int main()
{
    double mass[100]{};
    ofstream out("34.txt");
    f(mass);
    for (int i = 0; i < 100; i++)
    {
        out << mass[i] << ' ';
    }
}