السلام عليكــم ورحمـة الله وبركاتــه ،،
,,كــيفكم ان شااء الله بخيــر,,
أنـااا عضووه جديده بالمنتدى :D
وعنـدى طلب بسيط ياليت تسااعدووني فيهـ,,,
أنـااا عندي برناامج في لغة ++c
ولماا جيت اطبق البرناامج ,, طلع عندي خطاا ,, انحوولت عيووني واناا أدووره :wacko:
فياااليت تسااعدووني,وتصححوونهـ ,, انتظركم.. :lol:
#include <iostream.h>
#include <conio.h>
void main()
{
clrscr();
int x,z,sum=0,n;
char b=y;
do
{
cout<<"1-sandwich"<<endl;
cout<<"2-juice"<<endl;
cout<<"3- biscuite"<<endl;
cout<<"Enter your choice:"<<endl;
cin>>x;
switch (x)
{
case 1:
cout<<"Enter the amount:"<<n;
z=n*3;
cout <<"z="<<z<<endl;
sum=sum+z;
break;
case 2:
cout <<"Enter the amount:"<<n;
z=n*2;
cout<<"z="<<z;
sum=sum+z;
break;
case 3:
cout<<"Enter the amount:"<<n;
z=n*1;
cout <<"z="<<z;
sum=sum+z;
break;
}
cout<<"do you want another:"<<endl;
cin>>b;
}
while (b=y);
cout<<"sum="<<sum;
getch();
}