FamousWhy.ro Forum: Care Este Principala Diferenta Intre Comenzile "if" Si "while"? - FamousWhy.ro Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Care Este Principala Diferenta Intre Comenzile "if" Si "while"?

#1 User is offline   sEtH Icon

  • Administrator
  • Icon
  • Group: Admini
  • Posts: 632
  • Joined: 03-September 07
  • Gender:Male
  • Location:Craiova, Romania
  • Interests:Games-urile!!! :D
  • Idolul Meu:Will Smith

Posted 30 March 2008 - 07:24 PM


:what:
0

#2 User is offline   AndreiASM Icon

  • Boboc
  • Pip
  • Group: Membri
  • Posts: 5
  • Joined: 25-August 08
  • Gender:Male
  • Location:West Harlem

Posted 25 August 2008 - 05:20 PM

Daca nu cunosti diferenta dintre if si while, mai bine te lasi de programare. While e o bucla, in timp ce if e o simpla structura decizionala.
if (conditie)
   instructiune;
else
   alta_instructiune;

While reprezinta un ciclu
while (conditie) instructiune;
.
Cat timp instructiune e adevarata, se va repeta instructiune. la if e simplu: daca conditie e adevarata, se executa instructiune, in caz contrar se executa alta_instructiune.

Keep learning.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users