Jump to content
xTremeSurfer

Ce face ! in C++ ?

Recommended Posts

Posted

#include<iostream.h>

int main()

{

int i,n,v[20],min,gasit=0;

cout<<"n=";cin>>n;

for(i=1;i<=n;i++)

cin>>v;

for(i=1;i<=n && !gasit;i++)

if(v%2==0)

{

min=v;

gasit=1;

}

for(i=1;i<=n;i++)

if(v%2==0 &&v<min)

min=v;

cout<<min;

}

Problema afiseaza minimul par dintr-un sir de numere dat .

Nu inteleg ce face !gasit in programul asta .

Imi poate explica cineva? thx

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...