Пишет ошибку в 15 строчке: else without a previous if
#include 
#include 
using namespace std;
int main()
{
	int x;
	float A;
	cout<<"Введите х="<
	cin>>x;
	if (x >= M_PI); 
	{
	A=0;
	cout<<"y=0"<
}
	else
		if(M_PI>x && x>=0) 
			{
	        A=sin(x);
	        cout<<"y=sin(x)"<
		}
			else 
				if (0>x && x>=-2)
				{
				A=0;
				cout<<"y="<
			}
			else
			    if (x<=-2) 
				{
				A = pow((x+2),2);
				cout <<"y="<
			}
	return 0;
}
                        
                            
                            
                    Ответы
                                            Ответ дал: 
                                                                                    
                                        
                                            
                                                
                                                
                                                
                                                    0
                                                
                                            
                                        
                                    
                                        вот так правильно и тебе там нужно объявить M_PI
#include <iostream>#include <cmath>using namespace std;int main(){ int x; float A; cout<<"Введите х="; cin>>x; if (x >= M_PI){ A=0; cout<<"y=0"; } else if(M_PI>x && x>=0) { A=sin(x); cout<<"y=sin(x)"; } else if (0>x && x>=-2){ A=0; cout<<"y="; } else if (x<=-2) { A = pow((x+2),2); cout <<"y="; }
return 0;}
                                        
                                                #include <iostream>#include <cmath>using namespace std;int main(){ int x; float A; cout<<"Введите х="; cin>>x; if (x >= M_PI){ A=0; cout<<"y=0"; } else if(M_PI>x && x>=0) { A=sin(x); cout<<"y=sin(x)"; } else if (0>x && x>=-2){ A=0; cout<<"y="; } else if (x<=-2) { A = pow((x+2),2); cout <<"y="; }
return 0;}
                    Zhumabekanele:
                    я все проверила!!! Это правильно
                
            
                    
                    В каком компиляторе проверяли? На gcc не работает
                
            
                    
                    gnu g++ 11 5.1.0
                
            Вас заинтересует
                
                        1 год назад
                    
                
                        1 год назад
                    
                
                        2 года назад
                    
                
                        2 года назад
                    
                
                        3 года назад
                    
                
                        3 года назад
                    
                
                        8 лет назад