#include < iostream.h>
int maks(int a,int b,int c);
void main()
{
int a,b,c;
int max;
cout<<"a = "; cin >> a;
cout<<"b = "; cin >> b;
cout<<"c = "; cin >> c;
max = maks(a,b,c);
cout<
cout<<"Maksimal adalah = " << max;
}
int maks(int a,int b,int c)
{
int max;
max = a;
if(max < b)
{
max = b;
if(max < c)
{
max = c;
}
}
else if(max < c)
{
max = c;
}
else
{
max = a;
}
return max;
}
Komentar ini telah dihapus oleh administrator blog.
BalasHapus