#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include <math.h>
using namespace std;
void main() {
float y;
int x;
cout<<"Jep vleren e x-it:"<<endl;
cin>>x;
if (x>=1)
{
y=(x^3 - 2*x)/(1+x^2);
cout<<y<<endl;
}
if ((x>-1)&&(x<1))
{
y = sqrt(1+x^2);
cout<<y<<endl;
}
if (x<=-1)
{
y=x/(1+x^2);
cout<<y<<endl;
}
_getch();
}
x に基づいて y の値を計算する必要があります。しかし、何か問題があります。入力する- 3
と、 と表示されます0
。なんで?