Mzsmunna
10/16/2019 - 2:12 PM

Mid Assignment 3 MD.Mamunuz Zaman


//Mamunuz Zaman Sarker
//Roll No: 15-29817-2
//section: B3
#include<stdio.h>

int main()
{
    int i=1, j=0, k,sum = 0;
    int n, l;
    printf("Enter the value of n: \n");
    scanf("%d", &n);

    for(l=0; l < n; l++){
        printf("%d + ",i);
        sum = sum + i;
        k = i;
        i = i + j;
        j = k;
        }
        printf(". . . .\n");
        printf("\nSum is: %d\n", sum);

        return 0;
}