3 ta son berilgan, ular orasidan eng kattasini aniqlovchi dastur tuzilsin


Download 57.37 Kb.
Sana18.06.2023
Hajmi57.37 Kb.
#1556284

// 3 ta son berilgan, ular orasidan eng kattasini aniqlovchi dastur tuzilsin.

#include


using namespace std;

int main() {


int a, b, c;
cout << "3 ta son kiriting: \n";
cout << "a = ";
cin >> a;
cout << "b = ";
cin >> b;
cout << "c = ";
cin >> c;

int max = a;


if (b > max)
max = b;
if (c > max)
max = c;
cout << "3 ta sondan eng kattasi: " << max;
return 0;
}

Dastur natijasi:

Download 57.37 Kb.

Do'stlaringiz bilan baham:




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