Răspuns:
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
float delta_x, x1, x2;
cout<<"\nx1=";
cin>>x1;
cout<<"\nx2=";
cin>>x2;
cout<<"\ndelta_x=";
cin>>delta_x;
while(x1<=x2)
{
if(x1>=4)
cout<<"\ny="<<2*sqrt(x1+6);
else
cout<<"\ny="<<3-abs(x1);
x1=x1+delta_x;
}
return 0;
}
Explicație: