Untitled
unknown
plain_text
3 years ago
885 B
3
Indexable
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include <stdio.h> int main() { int j, i, N; printf("Enter a value: "); scanf("%d", &N); int arr[N+1]; for(i = 0; i < N+1; i++){ arr[i] = i*i; } printf("array elemnts:\n"); for(i = 0; i < N+1; i++){ if(i == 0) continue; printf("%d", arr[i]); if(i < N){ printf(", "); } } return 0; }
Editor is loading...