online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> #include <stdlib.h> #include <time.h> int main(){ int i; srand(999); printf("Seed và rand cố định\n"); for(i = 0; i < 100; ++i){ printf("%d ", rand() % 100 + 1); } printf("\n\n"); srand(time(0)); printf("Seed phụ thuộc thời gian và rand cố định:\n"); for(i = 0; i < 100; ++i){ printf("%d ", rand() % 100 + 1); } printf("\n\n"); srand(time(0)); printf("Seed và rand đều phụ thuộc thời gian:\n"); for(i = 0; i < 100; ++i){ printf("%d ", (rand() + (int)(time(0) % 100)) % 100 + 1); } printf("\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