مرحبا اختي شايمة الجامعة
هذي الحل حق problem1
#include <iostream>
#include <string>
using namespace std;
int main()
{
string str1,str2,str3;
string first,second,third;
cout<<"Please enter 3 names:";
cin>> str1>>str2>>str3;
if (str1<str2 && str1<str3)
{
first= str1;
if(str2<str3)
{
second=str2;
third=str3;
}
else
{
second=str3;
third=str2;
}
}
else if (str2<str1 && str2<str3)
{
first=str2;
if(str1<str2)
{
second=str1;
third=str3;
}
else
{
second=str3;
third=str1;
}
}
else
{
first=str3;
if(str1<str2)
{
second=str1;
third=str2;
}
else
{
second=str2;
third=str1;
}
}
cout<<"The alphabetical order of the names is:";
cout<<first<<endl;
cout<<second<<endl;
cout<<third<<endl;
system("pause");
return 0;
}
و بروبلم 2 للحين ما حليته
تمنياتي للجميع بالتوفيق