From 417ffce07bec447b4dfe046591715c8d46308135 Mon Sep 17 00:00:00 2001 From: AnirudhGosain <56385670+AnirudhGosain@users.noreply.github.com> Date: Thu, 10 Oct 2019 14:45:29 +0530 Subject: [PATCH] Update m7.c --- m7.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/m7.c b/m7.c index e69de29..8aede48 100644 --- a/m7.c +++ b/m7.c @@ -0,0 +1,19 @@ +#include + +void main() +{ + int i, n, t1 = 0, t2 = 1, next; + printf("Enter the number to find series"); + scanf("%d", &n); + + printf("Fibonacci Series till nummber entered is "); + + for (i = 1; i <= n; ++i) + { + printf("%d, ", t1); + next = t1 + t2; + t1 = t2; + t2 = next; + } + +}