السلام عليكم
مساعدة في كتابة برنامج يطبع كلمة english بالخط الاتيني الكبير ومن ثم يقوم بكتابة
nglisheay عن طريق وضع e في نهاية الكلمة ثم اضافة ay ونستخدم strtok
الى اللقاء
السلام عليكم
مساعدة في كتابة برنامج يطبع كلمة english بالخط الاتيني الكبير ومن ثم يقوم بكتابة
nglisheay عن طريق وضع e في نهاية الكلمة ثم اضافة ay ونستخدم strtok
الى اللقاء
أرجو المساعده يا إخوان
نحن لا نحل اسألة واجب
حط بدايتك للحل
ادخل حلها جافا اسهل وهتلاقى حد يرد عليك
واتمنى ان الاخوة يساعدوا على قدر المستطاع او يصمتوا
وانا اسف على الرد لكن مش دة اسلوب الاخوة ؟
السلام عليكم
كيف حالك اخي ABDULLAH1003 كل شيء مقبول منك ولكن لا تعمم بقولك نحن ولكن تكلم عن نفسك وفي مثل اكيد تعرفه الا وهو اذا كان الكلام من فضة فالسكوت من ذهب وشكرا على كل حال
الى اللقاء :):):):)
لم افهم ماذا تريد بالضبط ولكن هذا الكود حسب مافهمته من سؤالك
#include
#include
int main()
{
char myword[20];
char temp[20];
printf("please input your word :");scanf("%s",&myword);
int n=strlen(myword);
for(int i=1;i
temp[i-1]=myword;
temp[n-1]=myword[0];
temp[n]='a';
temp[n+1]='y';
temp[n+2]='
السلام عليكم
هذا نص السؤال ولكن باللغة الانجليزية
write a program that encoded english language phrases ito pig latin.Pig latin is a form of coded language often used for amusement.Many variations exit in the method used to from an english language phrase .tokenize the phrase into words function strtok .to translate each english word a pig-latin word place the first letter of the english word at end of the english word and add the letters" ay "thus, the word"jump"becomes"umpijay"the word"the"becomes"hetay" assume that the english phrase consists of word separated by blanks,there are no punctuation marks and all words have two or more letters.
Function printlatininword should display each word(Hint :Each time a token is found in a call to strtok .pass the token pointer to function printlatininword and print the pig-latin word
السلام عليكم
اخي الكريم khwlani حاولت ان اجرب الكود ولكن يظهر عندي خطأ
عدل البرنامج كما يلي والا
اكتب نوع الخطأ
char temp[20];
temp[n+2]='
شكرا لك اخي العزيز لقد اكتشفت الخطأ ولكن المعذرة لدي طلب اخر اذا اممكن الا وهو شرح البرنامج ان امكن باللغة الانجليزية اي مثلا
cout<
هذا مثال strtok ادمج البرنامجين مع بعض وستحصل على المطلوب
/* STRTOK.C: In this program, a loop uses strtok
* to print all the tokens (separated by commas
* or blanks) in the string named "string".
*/
#include
#include
char string[] = "A stringtof ,,tokensnand some more tokens";
char seps[] = " ,tn";
char *token;
void main( void )
{
printf( "%snnTokens:n", string );
/* Establish string and get the first token: */
token = strtok( string, seps );
while( token != NULL )
{
/* While there are tokens in "string" */
printf( " %sn", token );
/* Get next token: */
token = strtok( NULL, seps );
}
}
Output
A string of ,,tokens
and some more tokens
Tokens:
A
string
of
tokens
and
some
more
tokensالسلام عليكم اخي العزيز جربت ادمج البرنامج ولكن لم اعرف الرجاء المساعدة في اسرع وقت وشكرا
حاول تستخدم الدوال
اكتب محاولتك وسوف اساعدك ان شاء الله
هذا الذي فهمته ولدي سؤال عن كيفية ادخال اكثر من كلمة للبرنامج ثم يرجعها لpig latin
#include
#include
int main()
{
char myword[20];
char temp[20];
char seps[] = " ,tn";
char *token;
printf("please input your word :");scanf("%s",&myword);
int n=strlen(myword);
for(int i=1;i
{temp[i-1]=myword;
}
temp[n-1]=myword[0];
temp[n]='a';
temp[n+1]='y';
temp[n+2]='
هذا الموضوع مغلق.