عرض مشاركة واحدة
منتديات طلاب وطالبات جامعة الملك عبد العزيز منتديات طلاب وطالبات جامعة الملك عبد العزيز
  #1  
قديم 08-12-2009, 08:17 PM
الصورة الرمزية مواليد نكبت1411

مواليد نكبت1411 مواليد نكبت1411 غير متواجد حالياً

جامعي

 
تاريخ التسجيل: Apr 2009
التخصص: it
نوع الدراسة: إنتظام
المستوى: الثالث
الجنس: أنثى
المشاركات: 34
افتراضي رد: واجب البرمجــه ؟؟


هلا حبيبتي انا حليته بif وترى عادي حقوق الطبع مو محفوظه >>>int Grenache;
int x;
char city;
cout<<"city\tcode\n\n";
cout<<"jeddah\tj\n";
cout<<"makkah\tm\n";
cout<<"cairo\tc\n";
cout<<"enter your choice:";
cin>>city;
cout<<"enter the time in grenache:";
cin>> Grenache;
if(Grenache>=1 && Grenache<=24)
{
if(city='j')
{
x=(Grenache+3)
if (Grenache>=1 && Grenache<12)
cout<<"the time in jeddah: "<<x <<"a.m.";
else
cout<<"the time in jeddah: "<<x <<"p.m.";

}
else if(city='m')
{
x=(Grenache+3);
if (Grenache>=1 && Grenache<12)
cout<<"the time in makkah: "<<x <<"a.m.";
else
cout<<"the time in makkah: "<<x <<"p.m.";
}
else
{
x=(Grenache+2);
if (Grenache>=1 && Grenache<12)
cout<<"the time in cairo: "<<x <<"a.m.";
else
cout<<"the time in cairo: "<<x <<"p.m.";
}
}
else
cout<< "wrong entry not in the range of 1 to 24";
getch();
}
رد مع اقتباس