Computer Science

I am sharing with you three codes:
a) Ruby-the code calculates the sum of first n natural numbers
b) Fortran-code calculates factorial of a number
c) C++-code calculates sum of first n natural numbers

 

Don't use plagiarized sources. Get Your Custom Essay on
Computer Science
Just from $13/Page
Order Essay

Your assigment:
a) In Ruby by using user input, until and do loop your code will calculate the factorial of the number that the user has input
b) In Fortran by using user input, and while loop your code will calculate the sum of natural numbers until the number that the user has input
d) In C++ by using user input, until and do loop your code will calculate the factorial of the number that the user has input.

Leave a Reply

Your email address will not be published. Required fields are marked *