Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  123456
Language: C/C++
Code:
#include <stdio.h>
int main();
int pole[50],i,n,vyber,pocet;
printf("Vyber si 1.nahodne pole 2.rucne zadane");
scanf("%d",&vyber);
case'1':
        srand((unsigned)time(NULL));
        for(i=0;i<n;i++){
        pole[i]=rand()%20;
        }
break; 
case'2':
         for(i=0;i<n;i++){
        printf("\Zadaj cislo %d.",i+1);
        scanf("%d",&pole[i]);
        }
break;
       for(i=0;i<n;i++){
                        if(pole[i]%2==1)
                        pocet=+1;
                        }
printf("\%d ", pole[i]);
getch();
return 0;
}
          
Comments: