Skip to content

Commit

Permalink
upload
Browse files Browse the repository at this point in the history
  • Loading branch information
sujan-poudel-03 committed May 4, 2023
0 parents commit 260cac4
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: gcc.exe build active file",
"command": "C:\\MinGW\\bin\\gcc.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
15 changes: 15 additions & 0 deletions C/array.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include <stdio.h>

int main(){
int LA[3], i;
printf("Array Before Insertion:\n");
for(i = 0; i < 3; i++)
printf("LA[%d] = %d \n", i, LA[i]);
printf("Inserting Elements.. ");
printf("The array elements after insertion :\n"); // prints array values
for(i = 0; i < 3; i++) {
LA[i] = i + 2;
printf("LA[%d] = %d \n", i, LA[i]);
}
return 0;
}
Binary file added C/array.exe
Binary file not shown.
17 changes: 17 additions & 0 deletions Java/array.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
public class ArrayDemo {
public static void main(String []args) {
int LA[] = new int[3];
System.out.println("Array Before Insertion:");
for(int i = 0; i < 3; i++)
System.out.println("LA[" + i + "] = " + LA[i]); //prints empty array
System.out.println("Inserting Elements..");

// Printing Array after Insertion

System.out.println("Array After Insertion:");
for(int i = 0; i < 3; i++) {
LA[i] = i+3;
System.out.println("LA[" + i + "] = " + LA[i]);
}
}
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# DSA

0 comments on commit 260cac4

Please sign in to comment.