Question: The program has to be written in C programming Language. Question 1 Overview Write a program that calculates the Tribonacci number sequence but with different

The program has to be written in C programming Language.

The program has to be written in C programming Language. Question 1

Question 1 Overview Write a program that calculates the Tribonacci number sequence but with different sizes of integers and floats. Using unsigned shorts (16bit), unsigned ints (32bit), un numbers effeciently! Tribonnacci numbers are defined as a function tribonnaci(n) = tribonnaci(n-1) + tribonnaci(n-2) + tribonnaci(n-3), where tribonnaci(0) = 0 and tribonnaci(1) = 0 and tribonnaci(2) = 1 The tribonnacci sequence is defined here: https://oeis.org/A000073 The first few values of the sequence are: 0,0, 1, 1, 2, 4, 7, 13, 24, 44, 81, 149, 274,504, ... Example output The program will read from the terminal using scanf or fgets a number between 0 and 1023. Any other numbers or inputs are invalid input! Return 1 on invalid input. $ ./questioni Tribonacci! Type in a positive tribonacci input: -1 Invalid input! $ ./question1 Tribonacci! Type in a positive tribonacci input: Invalid input! $ ./question1 Tribonacci! Type in a positive tribonacci input: 10 16bit Tribonacci 81 32bit Tribonacci 81 64bit Tribonacci 81 Float Tribonacci 8.100000+01 Double Tribonacci 8.100000+01

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!