الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

اتمنى قبولي ضيفة جديدة و ان تساعدوني

مغلق
بدأه عاشقة الحرية في 23 نوفمبر 2002 · 6 رد · 512 مشاهدة · في ارشيف قسم C/C++
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

السلام عليكم

اتمنى ان تقبلوني ضيفة جديد عليكم و اتمنى ان تساعدوني في حل هذه التمارين بلغة السي ++

write a program that reads the input file"cprog.txt" and generates and writes the analysis to the output file named"analysis".txt.

Each line of the analysis includes information about conditional structures(if or swich) and repetition strustures (while, for,do-while)as follows:

type(x,y)where type is the structure,s type( number CONDITIONAL or REPETITION),X is the structure,and y is the number of the structure.

the output file canalysis.dat would be:

CONDITIONAL(1,1)

CONDITIONAL(2.2)

(1,3)REPETITION

REPETITION(2,1)

ONDITIONAL(3.2)

و السؤال الثاني هو

the detailed treament of string manipulation is greatly attributable to the exciting growth in the word processing in recent years.One important function in word processing systems is type-justification which is the alignment of word to both the left right margins of page.This generates a professional-looking document that gives the appearance of being set in type,rathe than prepared on a typewriter.

Type-justificaion can be accomplished on computer systems by inserting one or more blank characters between each of the words in a line so that the rightmost word aligns whith right margin.

writ a program that reads several lines of text and print this text in type-justified format.The program should print 65 characters per line.

و السموحة اخواني ان شاء الله ما اكون ثقلت عليكم:o

و اتمنى انكم تقدرون تساعدوني

و لكم تحياتي

#2

اهلا بكِ...

رجاء يا اختي ان تقرأي قوانين المنتدى فنحن هنا نساعدك في حل هذه المسائل لكن لا نحلها بدلا منك... هذا المنتدى للتعلّم لذا حاولي وضع تصوراتك للحل وستجدين الجميع في العون ان شاء الله.. فقط ابدأي اول خطوة.

واهلا بك مرة اخرى.

#4

السلام عليكم

نحن نرحب بكل الاعضاء الجدد لكن هناك شيء يجب عليك ان تعرفيه وهو ان تبدائي بحل الاسئلة ومن ثم اذا صادفتك اي صعوبة نحن في الخدمة ان شاء الله

ا

#5

السلام عليكم ,,,

أختي نعم كما قال الاخوه أكتبي ما عندك و نحن سنساعدك

في الصعوبات :)

يمكنك قراءة هذا الدرس عن الملفات في لغة السي:

تجديه هنا

و اتمنى ان يفيدك :)

تحياتي ,,, طلال.

#6

كا هو الحل

بس اذا تساعدوني فيه

جواب السؤال الأول

#include

#include

#define  MaxStr    150

int main() {

char in_Str[MaxStr], out_Str[MaxStr],

tmp_Str[MaxStr];

int c_row = 0, num_Condition = 0, num_Repetition =

0, order = 0;

FILE *input_File, *output_File;

input_File  = fopen ("cprog.txt",    "r");

output_File = fopen ("analysis.txt", "w");

printf ("nn********************");

printf ("n***  Exercise # 1  ***");

printf ("n********************");

while (fscanf (input_File, "%s", &in_Str) == 0) {

  c_row = 0;

  order = 0;

  strcpy(tmp_Str, '

#7

:)

هذا الموضوع مغلق.

مواضيع مشابهة