[Solved] CSE107 Lab6- The Fibonacci sequence

$25

File Name: CSE107_Lab6-_The_Fibonacci_sequence.zip
File Size: 329.7 KB

SKU: [Solved] CSE107 Lab6- The Fibonacci sequence Category: Tag:
5/5 - (1 vote)

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 sections 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.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CSE107 Lab6- The Fibonacci sequence
$25