السلام عليكم
مطلوب مني تحويل الـ flow chart المرفق إلى برنامج
و كتبت هذا الكود لكنه ما تطبق !! :wacko:
#include<iostream.h>
main()
{
int x[5][4]={110,1,44,13,111,2,13,15,112,3,17,42,113,4,15,31,114,5,64,23 };
int i,j,p1,p2,q1,q2,q3;
char answer;
do
{
cout<<"enter the book number \n";
cin>>p1;
for (int i=0;i<5;i++)
{
if (x[0]==p1) {p2==1;
else p2==0;
cout << " book not found\n";}}
if (p2 ==1)
{ cout<<"enter the q ";
cin>>q1;
for (int j=0;j<5;j++)
{
if(x[j][2]==q1) {q2==1;
q3==x[j][2];
else q2==0;
cout << " not enouph\n; }}
if(q2==1)
{cout<<"the q is "<<q3<<"\n";
cout << "do you want to countinue ? press Y to yes and N to no ";
cin >> answer;
if (answer=='Y')
{for(int i=0;i<5;i++)
cout<<x[2]*x[3];}} ' هذا يعني إيجاد حاصل ضرب سعر الكتاب الواحد في كمية الكتب
}
cout<<"do you want to serch about another book ? \n";
while (p2!=0 || q2!=0 || answer =='N' )
}الله يعافيكم لو توضحون لي الأخطاء اللي فيه و الله اني متورطه مره
و ودي أسأل عن لغات البرمجة بشكل عام سواء
C,C++,C#,VisualBasic.Net
أيهم أقوى ؟ عشان ودي أركز على وحده لانه الجامعه الله يغثها تعطينا من كل لغه حبتين ؟ :blink: