Documente Academic
Documente Profesional
Documente Cultură
Limbaj C++
Struct. simple:
cin>>v1>>v2>>v3>>>>vn;
cout<<e1<<e2<<e3<<<<en;
{ secvena } = { instr1; instr2; ...; instrn}
if (cond)
secv1
secv1
else
altfel
secv2
secv 2
while (cond)
secv A F
secv
do
secv
ct timp (cond)
secv
while (cond);
F
2.2
repet
do
secv
pn cnd (cond)
se repet secv pn cond. devine A
(ct timp cond. este f)
secv
while (! (cond) ) ;
Repet
Dac (cond.) atunci
Repet
secv
secv
Ct timp (cond.)
Ct timp
secv
secv
ct timp ( ! (cond.))
Pn cnd (cond.)
secv
Ct timp
Repet
secv
secv
ct timp (cond.)
Ct timp (cond.)
secv
Pentru i n, 1, -1 execut
secv
Ct timp
i1
ct timp (i<=n)
secv
i i +1
Ct timp
in
ct timp (i>=1)
secv
i i -1