0% found this document useful (0 votes)
3 views1 page

Assignment

The document provides two tasks: the first is to create a function that finds the maximum of three numbers by taking user input, and the second is to write a function that sums all numbers in a list. The first function uses R programming syntax for input and output. The second task is not detailed in the document.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Assignment

The document provides two tasks: the first is to create a function that finds the maximum of three numbers by taking user input, and the second is to write a function that sums all numbers in a list. The first function uses R programming syntax for input and output. The second task is not detailed in the document.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1.

Write a function to find the


max of three numbers.
In [1]:

maximum=function(a,b,c)

a=readline(prompt="enter the number")

[Link](a)

b=readline(prompt="enter the number")

[Link](b)

c=readline(prompt="enter the number")

[Link](c)

print(max(a,b,c))

maximum(a,b,c)

2. Write a function to sum all the


numbers in a list.

You might also like