السلام عليكم
ممكن مساعدة فى وضع جميع الترتبات الممكنه لحروف الكلمة
مثلا
qwe
النتيجة
qwe
weq
ewq
وشكرا
السلام عليكم
ممكن مساعدة فى وضع جميع الترتبات الممكنه لحروف الكلمة
مثلا
qwe
النتيجة
qwe
weq
ewq
وشكرا
according to ur output, you have to do a left rotation.
so if u have an array with the following indexes:
0 1 2
u should go over it
0 1 2
then rotate to the left
1 2 0
then rotate to the left one more time
2 0 1
ENG. IMAD, Programing is a way of life, It's in the air, we breath It's pumps through our veines, Without it, we soon crumble to dust
شكرا يا Super_emad55
كمان محتاجة مزيد من التوضيح
يعنى حستعمل بونتر ولا فانكشن ولا اورقريثم ولا فور ؟؟؟
تم تعديل هذه المشاركة بواسطة رسل2008 في 19 نوفمبر 2008 في 11:32
حل الأخ Super_Emad رائع ،،
هذا برنامج لتحويل الكلمة الى معكوسها و ممكن بالقليل من التعديلات تحصلى على ما تريدين
#include <iostream>
#include <string>
using namespace std;
int main(void)
{
string text;
cout << "Enter text to be inverted: ";
getline(cin, text);
char t2[text.size()];
for (int i=0; i<text.size(); i++)
{
t2[text.size()-i] = text;
}
cout << "Before invert: " << text << endl;
cout << "After invert: ";
for (int k=1; k<=text.size(); k++)
{
cout << t2[k];
}
cout << endl;
system("pause");
return 0;
}هذا كود التباديل باستخدام STL Algorithms
المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية
جارٍ التحقق من المتواجدين…