Untitled
unknown
plain_text
a year ago
632 B
1
Indexable
Never
#include <stdio.h> #include <stdlib.h> int min(int h, int j){ if(h < j){ return h; } else{ return j; } } int max(int h, int j){ if( h > j){ return h; } else{ return j; } } int main(){ int x, y, z; printf("Chuong trinh tim so lon nhat va nho nhat\n"); printf("Nhap ba so x, y ,z: \n"); scanf("%d %d %d", &x, &y, &z ); int lmax = max(x, y); int fmax = max(lmax, z); printf("So lon nhat: %d\n", fmax); int kmin = min(x, y); int omin = min(kmin, z); printf("So nho nhat: %d\n", omin); return 0; }