Skip to content

AbdulHamada/hw1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Homework 1

The series of Fibonacci numbers is defined as

alt text

where f(0) = 0, f(1) = 1. Write a program which reads an integer N from the console, calculates f(N) and prints the result to the console. For N=10 you should obtain the result 55.

Reading a number from the console

In order to read a number from the console and write this number into a variable N use the lines

cout << "N" << endl;
cin >> N; 

Notes

  • This homework is due until 4.11.2015
  • The file you have to edit is fibonacci.cxx, please leave all other files unchanged.
  • To compile your program use: g++ fibonacci.cxx -o fibonacci

About

Homework 1, due until 4.11.2015

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 91.3%
  • Makefile 8.7%