السلام عليكــم ورحمـة الله وبركاتــه
من المفترض إن هذا البرنامج يقرأ الأرقام من الجهتين لكنه لا يدخل إلى الشرط فقط يطبع الأرقام
كيف أجعله يدخل ويختبر الشرط؟؟؟؟
هناك مشكلة في أكواد المنتدى لذا أعتذر عن ظهور الكود بشكل ملخبط
</P>
<B><FONT face=Arial># <B><FONT face=Arial>include<iostream>
using namespace std;
int main()
{
int num1, num2, num3, num4, num5;</FONT></B></P>
<B><FONT face=Arial> cout<<"Enter five-digit integers: ";</FONT></B></P>
<B><FONT face=Arial> cin>>num1;
cin>>num2;
cin>>num3;
cin>>num4;
cin>>num5;</FONT></B></P>
<B><FONT face=Arial> // 12321
if(num1==num5)
{
if(num2==num4)</FONT></B></P>
<B><FONT face=Arial> cout<<"the number"<<num1<<num2<<num3<<num4<<num5<<"is palindrome\n";
else</FONT></B></P>
<B><FONT face=Arial> cout<<"The number"<<num1<<num2<<num3<<num4<<num5<<"is not palindrome\n";
}
else
// 45554
if(num1==num5)
{
if(num2==num3)
{
if(num3==num4)</FONT></B></P>
<B><FONT face=Arial> cout<<"The number"<<num1<<num2<<num3<<num4<<num5<<"is palindrome\n";
else
cout<<"The number"<<num1<<num2<<num3<<num4<<num5<<"is not palindrome\n";
}
}
else
// 11611
if(num1==num2)
{
if(num2==num4)
{
if(num4==num5)</FONT></B></P>
<B><FONT face=Arial> cout<<"The number"<<num1<<num2<<num3<<num4<<num5<<"is palindrome\n";
else
cout<<"The number"<<num1<<num2<<num3<<num4<<num5<<"is not palindrome\n";
}
}
else
// 55555
if(num1==num2)
{
if(num2==num3)
{
if(num3==num4)
{
if(num4==num5)</FONT></B></P>
<B><FONT face=Arial> cout<<"The number"<<num1<<num2<<num3<<num4<<num5<<"is palindrome\n";
else</FONT></B></P>
<B><FONT face=Arial> cout<<"The number"<<num1<<num2<<num3<<num4<<num5<<"is not palindrome\n";
}
}
}</FONT></B></P>
<B><FONT face=Arial> return 0;</FONT></B></P>
<B><FONT face=Arial>}
</FONT></B></P>
</FONT></B>
