Ada95 Program To Iteratively Compute The Factorial-Computer Programming-Assignment, Exercises of Computer Engineering and Programming

This assignment is for Computer Programming course. It was assigned by Prof. Anurag Negi at KIIT University. It includes: Ada95, Program, Fibonacci, Series, Algorithm, Factorial, Recursive, Electronic

Typology: Exercises

2011/2012

Uploaded on 07/20/2012

savitri_85
savitri_85 🇮🇳

4

(5)

70 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Problem C12. (Unified Computers and programming)
1. Write an Ada95 program to iteratively compute the factorial of a number (get
the number from the user). Turn in a hard copy for your algorithm and code
listing, and an electronic copy of your code.
2. Does your program work for all possible inputs? List the instances in which it
fails.
3. Write a recursive Ada95 program to compute the first ‘N’ Fibonacci numbers,
where ‘N’ is user defined. Turn in a hard copy for your algorithm and code
listing, and an electronic copy of your code.
Hint: The Fibonacci numbers are the numbers of the series 1, 1, 2, 3, 5, 8, 13, 21, …
What is the mathematical formula used to compute the numbers? Do you need more
than one function/ procedure?
docsity.com

Partial preview of the text

Download Ada95 Program To Iteratively Compute The Factorial-Computer Programming-Assignment and more Exercises Computer Engineering and Programming in PDF only on Docsity!

Problem C12. (Unified Computers and programming)

  1. Write an Ada95 program to iteratively compute the factorial of a number (get the number from the user). Turn in a hard copy for your algorithm and code listing, and an electronic copy of your code.
  2. Does your program work for all possible inputs? List the instances in which it fails.
  3. Write a recursive Ada95 program to compute the first ‘N’ Fibonacci numbers, where ‘N’ is user defined. Turn in a hard copy for your algorithm and code listing, and an electronic copy of your code.

Hint : The Fibonacci numbers are the numbers of the series 1, 1, 2, 3, 5, 8, 13, 21, … What is the mathematical formula used to compute the numbers? Do you need more than one function/ procedure?

docsity.com