السلام عليكم
انا عندي ماده مقدمه في البرمجه وطالبه الاستاذه واجب بالسويتش وكل كايس نستخدم فيه Loopانا عملت الكود وكتبته بس يطلع لي تحذير واذا عدلت التحذير طلع خطا فبليز ساعدوني لاني من جد تعبت منه
هذا كتابتي للكود
#include<iostream>
using namespace std;
void main()
{
int n,i;
int sum=0,fact=1,max=0;
double d;
cout<<"1.summation of anumber\n";
cout<<"2.factorial of a number\n";
cout<<"3.the largest number between 5 numbers\n";
cout<<"4.convert ion from SR to $\n";
cout<<"5.exist\n";
switch (n)
{
case 1:
cout<<"enter your number\n";
cin>>n;
for (int i=1;i<=n;i++)
sum+=i;
cout<<"the summation is"<<sum;
break;
case 2:
cout<<"enter your number\n";
cin>>n;
cout<<"the factorial";
for ( int i=0;i<=n;i++)
fact*=i;
cout<<fact;
break;
case 3:
cout<<"enter your number\n";
cin>>n;
for (int i=0;i<=5;i++)
if (n>max)
max=n;
cout<<"the max is"<<max;
break;
case 4:
cout<<"enter the amount riyal"<<endl;
cin>>n;
i=(n/3.75);
cout<<"dollar"<<i;
default:
cout<<"exist";
}
}ساعدوني بليز احتاجه ضروري


