online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> #include<string.h> int main(){ int T; scanf("%d", &T); for(int i = 0; i < T; i++){ int N; scanf("%d", &N); char NAMA[N][20]; int NILAI[N]; for(int j = 0; j < N; j++){ scanf("%[^#]#%d\n", NAMA[j], &NILAI[j]); } char ty[20]; scanf("%s", ty); int res = 0; for(int j = 0; j < N; j++){ if(strcmp(NAMA[j], ty) == 0){ res = j; } } int rank = 1; for(int j = 0; j < N; j++){ if(NILAI[j] > NILAI[res]){ rank++; } } printf("Case #%d: %d\n", i+1, rank); } 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