Note: This is a browser simulation. Real compilation requires a server.
#include <stdio.h> int main() { printf("Hello, World!\n"); return 0; }
#include <stdio.h> int main() { int n = 10, t1 = 0, t2 = 1, nextTerm; printf("Fibonacci Series: "); for (int i = 1; i <= n; ++i) { printf("%d, ", t1); nextTerm = t1 + t2; t1 = t2; t2 = nextTerm; } return 0; }
To actually compile C code on your computer:
program.c
gcc program.c -o program program.exe
sudo apt install gcc # Ubuntu/Debian brew install gcc # Mac
gcc program.c -o program ./program
0 Comments