#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
int i=10;
float a[150], n;
do
(a[1])=(float)i-(1/a[i+2]);
n=a[i];
i=i-2;
}
while (i>=1);
y=1/n
printf("skaicius yra &d.2",y);
system ("pause");
return 0
in 10 line(n=a[i];) it says: expected 'while before "n"
expected '('before "n"
expected ')' before ';' token
#include <cstdio>
#include <cstdlib>
#include <cmath>
int main()
{
int i = 10;
float a[ 150 ], n;
do
{
a[ 1 ] = ( float ) i - ( 1 / a[ i + 2 ] );
n = a[ i ];
i = i - 2;
} while ( i >= 1 );
float y = 1 / n;
printf( "skaicius yra &d.2", y );
system( "pause" );
return 0;
}