لو سمحتو عندي كود ما يطلع في اخطاء لكنه ما يشتغل بالشكل الصحيح
ماعرفت شو الخطا فيه ياريت تصححونه لي
#include<iostream>
using namespace std;
int main()
{
bool yes;
float x,y,o;
char z;
cout<<"************************************************************"<<endl;
cout<<" enter two floats value to opreate"<< endl;
cin>>x>>z>>y;
if(x>0)
if(y>o)
{
yes= true;
}
else
{
yes= false;
cout<<" plz enter nonzero numbers"<<endl;
}
while(yes==true)
{
if(z=='+')
{
o=y+x;
cout<<" the result is "<<o<<endl;
}
else if(z=='*')
{
o=y*z;
cout<<" the result is "<<o<<endl;
}
else if(z=='/')
{
o=x/y;
cout<<" the result is "<<o<<endl;
}
yes= false;
cout<<"************************************************************"<<endl;
cout<<" enter two floats value to opreate"<< endl;
cin>>x>>z>>y;
}
return 0;
}
اول مشكله ان اللوب ما ينعاد غير مرتين فقط
و ثاني مشكله اني لما ادخل اعداد سالبه مفروض انه ما يشتغل
وشكرا لتعاونكم