تسجيل الدخول

مشاهدة النسخة كاملة : ممكن مساعد في ++C



المشاعر
07-01-2006, 06:56 PM
طلب مني اصمم برنامج لاحد محلات بيع اجهزت الحاسب وضيفت هذا
البرنامج ادخال رقم القطعه المراد بيعها والكميه المطلوبه واذا كان رقم القطعه غير موجود او الكميه
تظهر رساله الاعلام عن ان الكميه غير متوفره او ان رقم القطعه غير موجود ثم يعيد المحاوله واذا توفرت الكميه وكان رقم القطعه موجود تظهر رساله ان الطلب موجود هل تريد اتمام العملية اذا كان الجواب نعم يظهر سعر القطعه الواحده وسعر مجموع المشتريات ثم يسئل اذا كان يريد اجراء عمليه اخرى
اذا مان الجواب نعم يعود من الاول واذا كان الجواب لا ينهي البرنامج
_ يجب استخدام في البرنامج جمل الدوران المناسبه
_يطبع عناصر المصفوفه بعد قرائتها
_اقتراح جمل اختيار مختلفه لفحص الكميه المتوفره
..............................................................
طبعا اعطاني اسماء البضعه مع الكميه المتوفره ورقم البضاعه واسعارها
.................................................

المشكله اني صممت البرنامج بس يقولي ان فيه خطاء و مو عارفه وش الخطاء

.................................................

#include<iostream.h>
void main(void)
{
int count,n;
char g;
int ss[5][3]={101,50,25,102,60,30,103,12,550,104,5,250,105,19,400};
cout<<"\n"<<"pace_no\tcount\tpace_price\n";
cout<<"101\t 50\t 25\n";
cout<<"102\t60\t30\n";
cout<<"103\t12\t550\n";
cout<<"104\t8\t250\n";
cout<<"105\t19\t400\n";
cout<<"inter n \n";
cin>>n;
if(n<=105&& n>=101)
{
cout<<"inter count:\n";
cin>>count;
if (n=101&&count<=50)
{
cout<<"are you want continue. press n to yes and f to no \n";
cin>>g;
if (g==n)
{
cout<<"the number of bace="<<n<<"\n"<<"end the count="<<count<<"\n"<<"the price=";
if (int b =101) ss [0][1]*[0][2]
else if(b=102) ss [1][1]*[1][2]
else if (b=103) ss [2][1]*[2][2]
else if(b=104) ss [3][1]*[3][2]
else (b=105) ss [4][1]*[4][2]
}
else
cout<<"thank you";
if (n=102&&count<=60)
{
cout<<"are you want continue. press n to yes and f to no \n";
cin>>g;
if (g==n)
cout<<"the number of bace="<<n<<"\n"<<"end the count="<<count<<"\n"<<"the price="<<count*ss[2][1];
else
cout<<"thank you";
}
else cout<<"the count is not here";

if (n=103&&count<=12)
{
cout<<"are you want continue. press n to yes and f to no \n";
cin>>g;
cout<<"the number of bace="<<n<<"\n"<<"and the";
if (g==n)
cout<<"count="<<count<<"\n";
else
cout<<"thank you";
}
else cout<<"the count is not here";
if (n=104&&count<=8)
{
cout<<"are you want continue. press n to yes and f to no \n";
cin>>g;
cout<<"the number of bace="<<n<<"\n"<<"and the";
if (g==n)
cout<< "count="<<count<<"\n";
else
cout<<"thank you";
}
else cout<<"the count is not here";

if (n=105&&count<=19)
{
cout<<"are you want continue. press n to yes and f to no \n";
cin>>g;
cout<<"the number of bace="<<n<<"\n"<<"and the";
if (g==n)
cout<< "count="<<count<<"\n";
else cout<<"thank you";
}
else cout<<"the count is not here";
}
else cout<<"the pace number in not here";
}
}

المشاعر
08-01-2006, 09:35 PM
وينكم مافيه احد يعرف الحل.؟؟؟


ابيه ضروري وراي اختبارات


وواجبات كثيره


:02:

kwinet
23-01-2006, 10:50 PM
بسم الله الرحمن الرحيم
السلام عليكم

أخي العزيز :


البرنامج مليء بالاخطاء
بل يبدوا لي أن في كل بضعة أسطر بعض الاخطاء.

نصيحة عند كتابة برنامج إهتم بمظهره وترتيبه حتى يستطيع الاخرين مساعدتك بسهولة أكبر.