Untitled
unknown
plain_text
3 years ago
413 B
5
Indexable
#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] << ' ';
}
}
Editor is loading...