online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> int main() { int i, n, firstTerm=0, secondTerm=1, sum=0; printf("\nEnter number of terms required in Fibonacci Series: "); scanf("%d",&n); // Showing the first two term of the Fibonacci Series printf("\nFibonacci Series is:\n\n\n %d %d ", firstTerm, secondTerm); //start i =2 i=2; //i starts from 2, as the first two terms of the series have already been shown while (i<n) { sum=firstTerm+secondTerm; firstTerm=secondTerm; secondTerm=sum; ++i; printf("%d ",sum); } return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue