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

برنامج في السي وانا ما اعرف لسي

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

<[]<[]>>

() () 



void parens (void) ( 

for (;; ) ( 

switch (lookahead) ( 

case '(' :

              M( '(' ) : paren (); M( ')' ); continue; 

case '<' :

              M( '<' ) : paren (); M( '>' ); continue; 

case '[' :

              M( '[' ) : paren (); M( ']' ); continue; 

Default; 

   Return;

    }

  }

}

هذا الكود في السي ادخل سترينج

مثلا ادخل ( لازم يعطيني )

ادخل < يعطيني >

ادخل [ يعطيني ]

The program checks whether an input string is balanced ; that is , if each opening parenthesis has a matching closing parenthesis .For the purposes of this exercise , brackets ,[ and ] , and the symbols < and > will also be referred to as parentheses . Any enclosed substrings must them selves be balanced . Complete the program by giving as implementation for procedure M and supplying an appropriate procedure main . The program must produce as output the string balanced if the input string consists of balanced parentheses .

#2

ممكن توضحي المطلوب اكثر :o .

تحياتي (f)

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

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