Update a4/program.c

This commit is contained in:
Yurii Yakovenko 2024-11-23 20:18:11 +00:00
parent 68212b6d24
commit 10a924f4f0

View File

@ -19,14 +19,17 @@ int main()
for(int i=0; i<n; i++)
{
if(2*i+1<n && a[i]>a[2*i+1]||
2*i+2<n && a[i]<a[2*i+2])
2*i+2<n && a[i]>a[2*i+2])
{
kupa =0;
kupa =0;
break;
}
}
if(kupa)
{
printf("Je to taka kopa:");
printf("%d", a[0]);
}
else
printf("Nie je kopa.");