[SOLVED] CSE107 Lab6- The Fibonacci sequence

35.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Lab6-u9chsj.zip (107.2 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

Write a C program that performs the task described below. Name your c file as nameSurnameId_tasknumber.c [ex: seydanurAhi171561011_1.c]

Upload your file to your section’s submission page on moodle. There is also a submission page for the ones who are not belong to any section.

1            Task

The Fibonacci sequence is a series whose first two elements are 0 and 1, and each subsequent element equals the sum of the two preceding elements. There is a Fibonacci sequence sample below.

0 1 1 2 3 5 8 13 21 …

Write a program that waits the user to enter a term number and prints the fibonacci numbers on the screen.

An example of the program:

Please enter how many terms you would like to print: 10

Top 10 terms: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34

2            Task

Write a program that waits the user to enter a number and prints whether the number is prime or not.

3          Task

A perfect number is a number whose sum of all positive divisors except itself is equal to itself.

For example 28 is the perfect number because 28 = 1 + 2 + 4 + 7 + 14.

Write a program that waits for the user to enter a number and prints whether the number is a perfect number or not.

  • Lab6-u9chsj.zip