Starting from:

$29

Assignment 1 An Integer

Homework Assignment 1

Description
•  You won’t be given a chance to correct any mistakes. • Write a C++ code which does the following: – Captures an integer from command line. Let this integer be L. – Prints the fibonacci pyramid which has L+1 number of rows. – Prints the largest number in the pyramid. – Prints the heart of the pyramid.
Example • User enters the following number: 9 • Your program prints the following: 1 1 1 2 1 2 3 2 2 3 5 3 4 3 5 8 5 6 6 5 8 13 8 10 9 10 8 13 21 13 16 15 15 16 13 21 34 21 26 24 25 24 26 21 34 55 34 42 39 40 40 39 42 34 55 Biggest number: 55 Heart of the pyramid: 6 6
Remarks • Do not use any elements which is not covered in class. • Do not submit your code without testing it with several different scenarios. • Write comments in your code.
Turn in: • Source code of a complete C++ program. Name of the file should be in this format: <full_name_<id.cpp. • Example: gokhan_kaya_000000.cpp. Please do not use any Turkish special characters. • You don’t need to use an IDE for this assignment. Your code will be compiled and run in a command window. • Your code will be compiled and tested on a Linux machine(Ubuntu). GCC will be used. • Make sure you don’t get compile errors when you issue this command : g++ <full_name_<id.cpp.
1
• A script will be used in order to check the correctness of your results. So, be careful not to violate the expected output format. • Provide comments unless you are not interested in partial credit. (If I cannot easily understand your design, you may loose points.) • You may not get full credit if your implementation contradicts with the statements in this document.

More products