// bai10.cpp : Defines the entry point for the console application.
//
#include"stdafx.h"
#include<conio.h>
#include<stdio.h>
floatmin(float x, floaty, float z)
{
floatmin1=x;
if(min1>y) min1=y;
elseif (min1>z) min1 = z;
returnmin1;
}
int_tmain(int argc, _TCHAR* argv[])
{
floatx,y,z;
printf("\nNhap 3 so thuc: ");
scanf("%f%f%f",&x,&y,&z);
printf("\nmin 3 so %7.3f,%7.3f,%7.3f la %7.3f",x,y,z,min(x,y,z));
getch();
return0;
}
No comments:
Post a Comment