First solve it. It will be 7.071.......
That will be an irrational number because it never ends.
Since the programming language for this program is not specified, here's a simple JAVA program for you:
public class Card //Name of your program
{
private short rank, suit;
private static String[] suits = { "hearts", "spades", "diamonds", "clubs" };
private static String[] ranks = { "Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King" };
public static String rankAsString( int __rank ) {
return ranks[__rank];
}
Card(short suit, short rank)
{
this.rank=rank;
this.suit=suit;
}
public @Override String toString()
{
return ranks[rank] + " of " + suits[suit];
}
public short getRank()
{
return rank;
}
public short getSuit()
{
return suit;
}
}//End of program
Answer: 25 km
Step-by-step explanation:
500 km / 5 = 100 km up stream
500 km / 4 = 125 km down stream
125 - 100 = 25 km in still water