RSS

Algoritm inedit

23 Mar

C++ poate fi şi amuzant…

#include<sesiune.h>
#include<studenţi.h>
#include<profesori.h>
int main( )
{ int număr_de_restanţe=0; 
 //se consideră că la începutul sesiunii ai zero restanţe

  do {

      număr_de_restanţe++;

     } while( nu_am_învăţat || nu_am_putut_copia_la_examen);

 if( număr_de_restanţe==0 )   cout<<"Get a life! ";

   else cout<<"Ai restanţă, ai prestanţă!!! ";

 getch( ); }
 
Leave a comment

Posted by on March 23, 2011 in Uncategorized

 

Tags: ,

Lasă un comentariu

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: