Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can anyone help in C++ Assignment 1. CS222. Program #1.15 +2 extra) points Write a program that computes Fibonacci series (Fibonacci numbers). Fibonacci numbers have

can anyone help in C++
image text in transcribed
Assignment 1. CS222. Program #1.15 +2 extra) points Write a program that computes Fibonacci series (Fibonacci numbers). Fibonacci numbers have the property that each consecutive number is a sum of two preceding 0,1,1,2,3,5,8,13,21.... Your program should ask user for the integer, and output the result, which shows Fibonacci number at that position. For example if user enters 'S'program should output 3 (fifth position in the series). Then the program should ask user for another integer, which is less than the first one, and output the message whether that integer belongs to the Fibonacci series or not. For example: First integer: Output: 21 Second integer: Output: 15 is not a Fibonacci number (If second integer was 13, program would output that it was a Fibonacci number). Your program should use array to compute and store the Fibonacci numbers, and use the same array to search if the second integer exists in that array. Extra points: At the end of the run, output formatted table (use sefill, iosflags and setw) of the first 10 Fibonacci numbers, Comment your program: Programmer: Your name Purpose: State the purpose of the program. Class: CS222 Assignment number 1 Describe all variables Describe important section of code. For example - describe loop exit condition Grading Comments 2 points Indentation 2 points Meaningful variables names 2 points Program runs 3 points Correct input and output 4 points Early loop termination 2 points Total 15 points Extra: Formatted table 2 points Deductions: No run filo program does not run does not compile Incorrect array declaration space allocation program crashes 5 points. 5 points

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions

Question

What would you do if the bullies and victim were girls?

Answered: 1 week ago

Question

CL I P COL Astro- L(1-cas0) Lsing *A=2 L sin(0/2)

Answered: 1 week ago