Panjiyev Javohir 213-20 guruh 7 labaratiriya topshirigi


Download 198.99 Kb.
bet3/3
Sana14.12.2020
Hajmi198.99 Kb.
#166412
1   2   3
Bog'liq
Javohir 213-20k lab 7 (1)


#include

using namespace std;

float ikkilantirish (float a, float x)

{

if (a==x) return a*2;

else return a;

}

int main ()

{

float a[24]={1,12,2,6,5,45,1,23,56,41,25,12,3,12,45,12,10,0,3,2,5,4,12,8};

cout << "massiv\n";

for (int i=0; i<24; i++)

{

cout << a[i] << "\t";

}

cout << endl;

int k;

cout << "massivdagi qaysi qiymat ikkilantirib yozilsin: "; cin >> k;

for (int i=0; i<24; i++)

{

a[i]=ikkilantirish(a[i],k);

cout << a[i] << "\t";

}

return 0;

}


Download 198.99 Kb.

Do'stlaringiz bilan baham:
1   2   3




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