#include <iostream>
#include <conio.h>
#include <stdlib.h>
using namespace std;
#define N 20
int main(void)
{
int res=0,A[N]; int count=0;int k=0;
int sum=0,i;
printf("Massiv -> ");
for(i=0; i<N; i++)
{
A[i]=rand()%10;
cout <<" "<<A[i];
if(A[i]<5)
{
sum+=A[i];
}
}
cout <<"\n 5 ten kishi sandardin kosindisi = "<<sum<<" boladi;";
{
for (int i=0; i<N; i++)
if (A[i]<5)
count++;
cout<<" 5 -ten kishi sandar sani: "<<count<<endl;
}
system("pause");
return 0;}
#include <conio.h>
#include <stdlib.h>
using namespace std;
#define N 20
int main(void)
{
int res=0,A[N]; int count=0;int k=0;
int sum=0,i;
printf("Massiv -> ");
for(i=0; i<N; i++)
{
A[i]=rand()%10;
cout <<" "<<A[i];
if(A[i]<5)
{
sum+=A[i];
}
}
cout <<"\n 5 ten kishi sandardin kosindisi = "<<sum<<" boladi;";
{
for (int i=0; i<N; i++)
if (A[i]<5)
count++;
cout<<" 5 -ten kishi sandar sani: "<<count<<endl;
}
system("pause");
return 0;}