السلام عليكم
اتمنى ان تقبلوني ضيفة جديد عليكم و اتمنى ان تساعدوني في حل هذه التمارين بلغة السي ++
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
و اتمنى انكم تقدرون تساعدوني
و لكم تحياتي