In this program, You will learn how to find the greatest number among the three numbers in R.

```
Find Greatest Among Three Numbers
Numbers Is :10 20 40 => 40
Numbers Is :30 20 10 => 30
```

## Example: How to find the greatest number among three numbers in R

```
{
x <- as.integer(readline(prompt = "Enter first number :"))
y <- as.integer(readline(prompt = "Enter second number :"))
z <- as.integer(readline(prompt = "Enter third number :"))
if (x > y && x > z) {
print(paste("Greatest is :", x))
} else if (y > z) {
print(paste("Greatest is :", y))
} else{
print(paste("Greatest is :", z))
}
}
```

#### Output:

```
Enter first number :2
Enter second number :22
Enter third number :4
[1] "Greatest is : 22"
```