From 3889e0cd5f1e0d59e0c38b129ad52f3df4d4a820 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 19 Oct 2018 17:08:45 +0530 Subject: [PATCH 1/6] First Task --- Nth-Digit-Fibonacci/JayAkabri/Main.java | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Nth-Digit-Fibonacci/JayAkabri/Main.java diff --git a/Nth-Digit-Fibonacci/JayAkabri/Main.java b/Nth-Digit-Fibonacci/JayAkabri/Main.java new file mode 100644 index 0000000..e51aa57 --- /dev/null +++ b/Nth-Digit-Fibonacci/JayAkabri/Main.java @@ -0,0 +1,34 @@ +import java.io.*; +import java.util.*; +public class Main { + + public static void main(String[] args) { + + int n = 1000, t1 = 0, t2 = 1,count=1,no=0; + + Scanner sc = new Scanner(System.in); + + System.out.println("Enter Number"); + no = sc.nextInt(); + + // System.out.print("Upto " + n + ": "); + while (count Date: Fri, 26 Oct 2018 09:42:43 +0530 Subject: [PATCH 2/6] palindrome added --- Palindrome/pelindrom.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Palindrome/pelindrom.c diff --git a/Palindrome/pelindrom.c b/Palindrome/pelindrom.c new file mode 100644 index 0000000..7fc847f --- /dev/null +++ b/Palindrome/pelindrom.c @@ -0,0 +1,31 @@ +#include +int pelindrome(int n) +{ + int t,r = 0; + t=n; + while(t!=0) + { + r=r*10; + r=r+(t%10); + t=t/10; + } + if(r==n) + return 1; + else + return 0; +} +void main() +{ + int k,d,i; + printf("enter number: "); + scanf("%d",&k); + i = k + 1; + while(1) + { + d=palindrome(i); + if(d==1) + break; + i++; + } + printf("%d",i); +} From 9ff6278202d0f4df0a3a8e78aa65818c89cdc30e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 26 Oct 2018 11:01:18 +0530 Subject: [PATCH 3/6] 3rd Task --- .../JayAkbari/bubblesort.c | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Array-Sorting-Without-Function/JayAkbari/bubblesort.c diff --git a/Array-Sorting-Without-Function/JayAkbari/bubblesort.c b/Array-Sorting-Without-Function/JayAkbari/bubblesort.c new file mode 100644 index 0000000..a99e9a2 --- /dev/null +++ b/Array-Sorting-Without-Function/JayAkbari/bubblesort.c @@ -0,0 +1,39 @@ + +#include +#define MAXSIZE 10 + +void main() +{ + int array[MAXSIZE]; + int i, j, num, temp; + printf("Enter the value of num \n"); + scanf("%d", &num); + printf("Enter the elements one by one \n"); + for (i = 0; i < num; i++) + { + scanf("%d", &array[i]); + } + printf("Input array is \n"); + for (i = 0; i < num; i++) + { + printf("%d\n", array[i]); + } + /* Bubble sorting begins */ + for (i = 0; i < num; i++) + { + for (j = 0; j < (num - i - 1); j++) + { + if (array[j] > array[j + 1]) + { + temp = array[j]; + array[j] = array[j + 1]; + array[j + 1] = temp; + } + } + } + printf("Sorted array is...\n"); + for (i = 0; i < num; i++) + { + printf("%d\n", array[i]); + } +} \ No newline at end of file From 0adfa94be67981a0b40819aa56b45aedefdf4b50 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 26 Oct 2018 11:04:22 +0530 Subject: [PATCH 4/6] delete folder --- .../JayAkbari/bubblesort.c | 39 ------------------- 1 file changed, 39 deletions(-) delete mode 100644 Array-Sorting-Without-Function/JayAkbari/bubblesort.c diff --git a/Array-Sorting-Without-Function/JayAkbari/bubblesort.c b/Array-Sorting-Without-Function/JayAkbari/bubblesort.c deleted file mode 100644 index a99e9a2..0000000 --- a/Array-Sorting-Without-Function/JayAkbari/bubblesort.c +++ /dev/null @@ -1,39 +0,0 @@ - -#include -#define MAXSIZE 10 - -void main() -{ - int array[MAXSIZE]; - int i, j, num, temp; - printf("Enter the value of num \n"); - scanf("%d", &num); - printf("Enter the elements one by one \n"); - for (i = 0; i < num; i++) - { - scanf("%d", &array[i]); - } - printf("Input array is \n"); - for (i = 0; i < num; i++) - { - printf("%d\n", array[i]); - } - /* Bubble sorting begins */ - for (i = 0; i < num; i++) - { - for (j = 0; j < (num - i - 1); j++) - { - if (array[j] > array[j + 1]) - { - temp = array[j]; - array[j] = array[j + 1]; - array[j + 1] = temp; - } - } - } - printf("Sorted array is...\n"); - for (i = 0; i < num; i++) - { - printf("%d\n", array[i]); - } -} \ No newline at end of file From b6e9e55ff9d8d3d0e76829f3b438a511bca38813 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 26 Oct 2018 11:11:42 +0530 Subject: [PATCH 5/6] 3rd Task --- .../JayAkbari/bubblesort.c | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Array-Sorting-Without-Function/JayAkbari/bubblesort.c diff --git a/Array-Sorting-Without-Function/JayAkbari/bubblesort.c b/Array-Sorting-Without-Function/JayAkbari/bubblesort.c new file mode 100644 index 0000000..a99e9a2 --- /dev/null +++ b/Array-Sorting-Without-Function/JayAkbari/bubblesort.c @@ -0,0 +1,39 @@ + +#include +#define MAXSIZE 10 + +void main() +{ + int array[MAXSIZE]; + int i, j, num, temp; + printf("Enter the value of num \n"); + scanf("%d", &num); + printf("Enter the elements one by one \n"); + for (i = 0; i < num; i++) + { + scanf("%d", &array[i]); + } + printf("Input array is \n"); + for (i = 0; i < num; i++) + { + printf("%d\n", array[i]); + } + /* Bubble sorting begins */ + for (i = 0; i < num; i++) + { + for (j = 0; j < (num - i - 1); j++) + { + if (array[j] > array[j + 1]) + { + temp = array[j]; + array[j] = array[j + 1]; + array[j + 1] = temp; + } + } + } + printf("Sorted array is...\n"); + for (i = 0; i < num; i++) + { + printf("%d\n", array[i]); + } +} \ No newline at end of file From 033fa1f46807a9d1d515a7626c92c49ac5ebde5c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 26 Oct 2018 11:22:54 +0530 Subject: [PATCH 6/6] 4th task --- Draw-Pattern/JayAkbari/draw-pattern.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Draw-Pattern/JayAkbari/draw-pattern.c diff --git a/Draw-Pattern/JayAkbari/draw-pattern.c b/Draw-Pattern/JayAkbari/draw-pattern.c new file mode 100644 index 0000000..38bc833 --- /dev/null +++ b/Draw-Pattern/JayAkbari/draw-pattern.c @@ -0,0 +1,16 @@ +#include +void main() +{ + int i, j,k; + for(i=5; i>=1; i--) + { + for(j=5; j>=1; j--) + { + for(k=i; k>=1; k--) + { + printf("%d",j); + } + } + printf("\n"); + } +}