online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Online C Compiler. Code, Compile, Run and Debug C program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include<stdio.h> int main(void) { int i , x , n1 , n2 , fib; printf("\nCALCOLO SEQUENZA DI FIBONACCI\n\n"); printf("\n\nQuanti numeri vuoi stampare massimo? "); scanf("%d",&x); if (x<=0) printf("\n ERRORE"); else if (x==1) printf("\n\nECCO LA SEQUENZA RICHIESTA: 1 "); else if (x==2) printf("\n\nECCO LA SEQUENZA RICHIESTA: 1 , 1 "); else { n1=1; n2=1; printf("\n\nECCO LA SEQUENZA RICHIESTA: 1 , 1 "); for (i=3 ; i<=x ; i++) { fib=n1+n2; printf(", %d ", fib); n1=n2; n2=fib; } } printf("\n\n"); 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