1-misol #include using namespace std; int main{ int x[]={1,2,3,4,5,4,9,12,8,13,17}; int y[10]; for int i=0;i


Download 12.16 Kb.
Sana06.12.2020
Hajmi12.16 Kb.

Sharipov Javohir 28-raqam

1-MISOL

#include

using namespace std;

int main(){

int x[]={1,2,3,4,5,4,9,12,8,13,17};

int y[10];

for (int i=0 ;i<10 ;i++){

y[i]=i*x[i];

}

for (int n=0;n<10;n++){

cout<

return 0;

}

2-MISOL

#include

using namespace std;

int main(){

float x[]={-14.5, 3.2, 6.8, - 4.3, 11.2, 5.6, - 7.8};

float y[7];

float z[7];

int j=0,n=0;

for (int i=0 ;i<7 ;i++){

if (i%2==0)y[n++]=x[i];

else z[j++] = x[i];

}

cout<<"x massiv elementlari="<

for (int i=0;i<7;i++){

cout<

cout<

cout<<"y massiv elementlari="<

for (int i=0;i

cout<

cout<

cout<<"z massiv elementlari="<

for (int i=0;i

cout<

return 0;

}

3_misol

#include

using namespace std;

int main(){

int a[10];

int b[10];

int s, p,min,j=0;

for (int i=0 ;i<10;i++){

cin>>b[i];

}

for (int i=0 ;i<10;i++){

if (b[i]<0) a[j++]= b[i];

}

min=a[0];

for (int i=0 ;i

if (a[i]

}

p =a[s];

a[s]=a[0];

a[0]=p;

for (int i=0 ;i

cout<

}

return 0;

}
Download 12.16 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2020
ma'muriyatiga murojaat qiling