download
I. ALGORITHM
{Read three integers, determine the largest number among threenumbers and display it to screen}
DECLARATION
x, y, z: integer
DESCRIPTION
read (x, y, z)
if (x> y) and (x> z) then write ('The biggest number is = x)
else if (y> x) and (y> z) then write (the largest number is = y)
else write (the largest number is z)
end if
II. Source code in C + +
# include
# include
class appeal {
friend istream& operator >> ( istream&, vs& );
public:
appeal (){};
void compare () {
if ((x> y) & & (x> z))
cout <<"the largest number:" <
cout <<"the largest number:" <
cout <<"the largest number:" <
private:
int x, y, z;
};
istream& operator>> (istream& in, appeals& number) {
cout <<"Numbers first =";
in>> bilangan.x;
cout <<"The second number =";
in>> bilangan.y;
cout <<"third number =";
in>> bilangan.z;
return ins;
}
int main () {
appeal number;
cin>> number;
bilangan.bandingkan ();
return 0;
}
download
0 comments:
Post a Comment