Skip to content

Commit

Permalink
Update 2.cpp.md
Browse files Browse the repository at this point in the history
  • Loading branch information
botond-szabo authored Aug 26, 2024
1 parent 3d7fbdc commit 48958dc
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions content/4.languages/2.cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,16 @@ To get started using Necto with C++ and Conan:

#conanfile.py
```python
from conan import ConanFile
from conan.tools.cmake import cmake_layout

class ExampleRecipe(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "CMakeDeps", "CMakeToolchain"
def requirements(self):
self.requires("poco/1.13.3")
def layout(self):
cmake_layout(self)
def fib(n): # write Fibonacci series up to n
"""Print a Fibonacci series up to n."""
a, b = 0, 1
while a < n:
print(a, end=' ')
a, b = b, a+b
print()

# Now call the function we just defined:
fib(2000)
```

:::
Expand Down

0 comments on commit 48958dc

Please sign in to comment.