diff options
author | adityacp | 2016-12-23 12:21:10 +0530 |
---|---|---|
committer | adityacp | 2016-12-23 12:21:10 +0530 |
commit | 14b628f49a7d0aa58c22c021c62a5d0a748ae881 (patch) | |
tree | 64ada1524098b3bcac6e5fe7a26fe17bca53f925 | |
parent | dd1eeca0267159ddde3036c706818dec0b7e5f45 (diff) | |
download | online_test-14b628f49a7d0aa58c22c021c62a5d0a748ae881.tar.gz online_test-14b628f49a7d0aa58c22c021c62a5d0a748ae881.tar.bz2 online_test-14b628f49a7d0aa58c22c021c62a5d0a748ae881.zip |
Remove unused files for java, c, bash, scilab
35 files changed, 0 insertions, 1010 deletions
diff --git a/yaksh/bash_files/sample.args b/yaksh/bash_files/sample.args deleted file mode 100644 index 4d9f00d..0000000 --- a/yaksh/bash_files/sample.args +++ /dev/null @@ -1,2 +0,0 @@ -1 2 -2 1 diff --git a/yaksh/bash_files/sample.sh b/yaksh/bash_files/sample.sh deleted file mode 100755 index e935cb3..0000000 --- a/yaksh/bash_files/sample.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -[[ $# -eq 2 ]] && echo $(( $1 + $2 )) && exit $(( $1 + $2 )) diff --git a/yaksh/bash_files/sample1.args b/yaksh/bash_files/sample1.args deleted file mode 100644 index 541cb64..0000000 --- a/yaksh/bash_files/sample1.args +++ /dev/null @@ -1 +0,0 @@ -test.txt
\ No newline at end of file diff --git a/yaksh/bash_files/sample1.sh b/yaksh/bash_files/sample1.sh deleted file mode 100755 index 965874b..0000000 --- a/yaksh/bash_files/sample1.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -cat $1 diff --git a/yaksh/bash_files/sample2.args b/yaksh/bash_files/sample2.args deleted file mode 100755 index cf4499d..0000000 --- a/yaksh/bash_files/sample2.args +++ /dev/null @@ -1 +0,0 @@ -file1.csv file2.csv file3.csv diff --git a/yaksh/bash_files/sample2.sh b/yaksh/bash_files/sample2.sh deleted file mode 100755 index 5dc55b8..0000000 --- a/yaksh/bash_files/sample2.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -cat $1 | cut -d: -f2 | paste -d: $3 - $2 diff --git a/yaksh/c_cpp_files/file_data.c b/yaksh/c_cpp_files/file_data.c deleted file mode 100644 index 1c0ab12..0000000 --- a/yaksh/c_cpp_files/file_data.c +++ /dev/null @@ -1,25 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -extern int ans(); - -template <class T> -void check(T expect,T result) -{ - if (expect == result) - { - printf("\nCorrect:\n Expected %d got %d \n",expect,result); - } - else - { - printf("\nIncorrect:\n Expected %d got %d \n",expect,result); - exit (0); - } -} - -int main(void) -{ - int result; - result = ans(); - check(50, result); -} diff --git a/yaksh/c_cpp_files/main.cpp b/yaksh/c_cpp_files/main.cpp deleted file mode 100755 index ebe1f08..0000000 --- a/yaksh/c_cpp_files/main.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -extern int add(int, int); - -template <class T> - -void check(T expect, T result) -{ - if (expect == result) - { - printf("\nCorrect:\n Expected %d got %d \n",expect,result); - } - else - { - printf("\nIncorrect:\n Expected %d got %d \n",expect,result); - exit (1); - } -} - -int main(void) -{ - int result; - result = add(0,0); - printf("Input submitted to the function: 0, 0"); - check(0, result); - result = add(2,3); - printf("Input submitted to the function: 2 3"); - check(5,result); - printf("All Correct\n"); - return 0; -} diff --git a/yaksh/c_cpp_files/main2.c b/yaksh/c_cpp_files/main2.c deleted file mode 100755 index ccd1768..0000000 --- a/yaksh/c_cpp_files/main2.c +++ /dev/null @@ -1,30 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -extern int add(int, int, int); - -template <class T> -void check(T expect,T result) -{ - if (expect == result) - { - printf("\nCorrect:\n Expected %d got %d \n",expect,result); - } - else - { - printf("\nIncorrect:\n Expected %d got %d \n",expect,result); - exit (0); - } -} - -int main(void) -{ - int result; - result = add(0,0,0); - printf("Input submitted to the function: 0, 0, 0"); - check(0, result); - result = add(2,3,3); - printf("Input submitted to the function: 2, 3, 3"); - check(8,result); - printf("All Correct\n"); -} diff --git a/yaksh/c_cpp_files/main_array_check.cpp b/yaksh/c_cpp_files/main_array_check.cpp deleted file mode 100755 index ea34fdd..0000000 --- a/yaksh/c_cpp_files/main_array_check.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -extern bool array_check(int [], int); - -template <class T> - -void check(T expect,T result) -{ - if (expect == result) - { - printf("\nCorrect:\n Expected %d got %d \n",expect,result); - } - else - { - printf("\nIncorrect:\n Expected %d got %d \n",expect,result); - exit (1); - } -} - -int main(void) -{ - bool result; - int a[] = {1,2,3,0,0}; - result = array_check(a, 2); - printf("Input submitted to the function: {1, 2, 3, 0, 0} and index 2"); - check(false, result); - int b[] = {1,2,3,4,5}; - result = array_check(b, 3); - printf("Input submitted to the function: {1, 2, 3, 4, 5} and index 3"); - check(true, result); - printf("All Correct\n"); - return 0; -} diff --git a/yaksh/c_cpp_files/main_array_check_all.cpp b/yaksh/c_cpp_files/main_array_check_all.cpp deleted file mode 100755 index 140578e..0000000 --- a/yaksh/c_cpp_files/main_array_check_all.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -extern bool array_check_all(int []); - -template <class T> - -void check(T expect,T result) -{ - if (expect == result) - { - printf("\nCorrect:\n Expected %d got %d \n",expect,result); - } - else - { - printf("\nIncorrect:\n Expected %d got %d \n",expect,result); - exit (1); - } -} - -int main(void) -{ - bool result; - int a[] = {1,2,3,2,8}; - result = array_check_all(a); - printf("Input submitted to the function: {1, 2, 3, 2, 8}"); - check(false, result); - int b[] = {4,2,32,4,56}; - result = array_check_all(b); - printf("Input submitted to the function: {4, 2, 32, 4, 56}"); - check(true, result); - printf("All Correct\n"); - return 0; -} diff --git a/yaksh/c_cpp_files/main_array_sum.cpp b/yaksh/c_cpp_files/main_array_sum.cpp deleted file mode 100755 index 55b2ebf..0000000 --- a/yaksh/c_cpp_files/main_array_sum.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -extern int array_sum(int []); - -template <class T> - -void check(T expect,T result) -{ - if (expect == result) - { - printf("\nCorrect:\n Expected %d got %d \n",expect,result); - } - else - { - printf("\nIncorrect:\n Expected %d got %d \n",expect,result); - exit (1); - } -} - -int main(void) -{ - int result; - int a[] = {1,2,3,0,0}; - result = array_sum(a); - printf("Input submitted to the function: {1, 2, 3, 0, 0}"); - check(6, result); - int b[] = {1,2,3,4,5}; - result = array_sum(b); - printf("Input submitted to the function: {1, 2, 3, 4, 5}"); - check(15,result); - printf("All Correct\n"); - return 0; -} diff --git a/yaksh/c_cpp_files/main_blackJack.cpp b/yaksh/c_cpp_files/main_blackJack.cpp deleted file mode 100755 index cc54e78..0000000 --- a/yaksh/c_cpp_files/main_blackJack.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -extern int blackJack(int, int); - -template <class T> - -void check(T expect, T result) -{ - if (expect == result) - { - printf("\nCorrect:\n Expected %d got %d \n",expect,result); - } - else - { - printf("\nIncorrect:\n Expected %d got %d \n",expect,result); - exit (1); - } -} - -int main(void) -{ - int result; - result = blackJack(11, 12); - printf("Input submitted to the function: 11, 12"); - check(12, result); - result = blackJack(15, 19); - printf("Input submitted to the function: 15, 19"); - check(19, result); - result = blackJack(10, 21); - printf("Input submitted to the function: 10, 21"); - check(21, result); - result = blackJack(31, 22); - printf("Input submitted to the function: 31, 22"); - check(0, result); - result = blackJack(91, 61); - printf("Input submitted to the function: 91, 61"); - check(0, result); - printf("All Correct\n"); - return 0; -} diff --git a/yaksh/c_cpp_files/main_check_digit.cpp b/yaksh/c_cpp_files/main_check_digit.cpp deleted file mode 100755 index d3bf3d6..0000000 --- a/yaksh/c_cpp_files/main_check_digit.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -extern bool check_digit(int, int); - -template <class T> - -void check(T expect, T result) -{ - if (expect == result) - { - printf("\nCorrect:\n Expected %d got %d \n",expect,result); - } - else - { - printf("\nIncorrect:\n Expected %d got %d \n",expect,result); - exit (1); - } -} - -int main(void) -{ - bool result; - result = check_digit(12, 23); - printf("Input submitted to the function: 12, 23"); - check(true, result); - result = check_digit(22, 11); - printf("Input submitted to the function: 121"); - check(false, result); - printf("All Correct\n"); - return 0; -} diff --git a/yaksh/c_cpp_files/main_count667.cpp b/yaksh/c_cpp_files/main_count667.cpp deleted file mode 100755 index f146e8c..0000000 --- a/yaksh/c_cpp_files/main_count667.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -extern int count667(int[]); - -template <class T> - -void check(T expect, T result) -{ - if (expect == result) - { - printf("\nCorrect:\n Expected %d got %d \n",expect,result); - } - else - { - printf("\nIncorrect:\n Expected %d got %d \n",expect,result); - exit (1); - } -} - -int main(void) -{ - int result; - int arr[5] = {2,6,4,5,6}; - result = count667(arr); - printf("Input submitted to the function: [2, 6, 4, 5,6]"); - check(0, result); - int arr2[5] = {6,6,2,17,9}; - result = count667(arr2); - printf("Input submitted to the function: [6, 6, 2, 17, 9]"); - check(1, result); - int arr3[5] = {6,6,6,7,1}; - result = count667(arr3); - printf("Input submitted to the function: [6, 6, 7, 2, 1]"); - check(3, result); - int arr4[5] = {6,7,7,6,6}; - result = count667(arr4); - printf("Input submitted to the function: [6, 7, 7, 6, 6]"); - check(2, result); - printf("All Correct\n"); - return 0; -} diff --git a/yaksh/c_cpp_files/main_count7.cpp b/yaksh/c_cpp_files/main_count7.cpp deleted file mode 100755 index 982e930..0000000 --- a/yaksh/c_cpp_files/main_count7.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -extern int count7(int[]); - -template <class T> - -void check(T expect, T result) -{ - if (expect == result) - { - printf("\nCorrect:\n Expected %d got %d \n",expect,result); - } - else - { - printf("\nIncorrect:\n Expected %d got %d \n",expect,result); - exit (1); - } -} - -int main(void) -{ - int result; - int arr[4] = {2,3,4,5}; - result = count7(arr); - printf("Input submitted to the function: [2, 3, 4, 5]"); - check(0, result); - int arr2[4] = {1,2,17,9}; - result = count7(arr2); - printf("Input submitted to the function: [1, 2, 17, 9]"); - check(0, result); - int arr3[4] = {7,9,2,1}; - result = count7(arr3); - printf("Input submitted to the function: [7, 9, 2, 1]"); - check(1, result); - int arr4[4] = {1,7,7,7}; - result = count7(arr4); - printf("Input submitted to the function: [1, 7, 7, 7]"); - check(3, result); - printf("All Correct\n"); - return 0; -} diff --git a/yaksh/c_cpp_files/main_fact.cpp b/yaksh/c_cpp_files/main_fact.cpp deleted file mode 100755 index a4ff230..0000000 --- a/yaksh/c_cpp_files/main_fact.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -extern int factorial(int); - -template <class T> - -void check(T expect, T result) -{ - if (expect == result) - { - printf("\nCorrect:\n Expected %d got %d \n",expect,result); - } - else - { - printf("\nIncorrect:\n Expected %d got %d \n",expect,result); - exit (1); - } -} - -int main(void) -{ - int result; - result = factorial(0); - printf("Input submitted to the function: 0"); - check(1, result); - result = factorial(3); - printf("Input submitted to the function: 3"); - check(6, result); - printf("All Correct\n"); - return 0; -} diff --git a/yaksh/c_cpp_files/main_greatest.cpp b/yaksh/c_cpp_files/main_greatest.cpp deleted file mode 100755 index 6d0a7c2..0000000 --- a/yaksh/c_cpp_files/main_greatest.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -extern int greatest(int, int, int); - -template <class T> - -void check(T expect, T result) -{ - if (expect == result) - { - printf("\nCorrect:\n Expected %d got %d \n",expect,result); - } - else - { - printf("\nIncorrect:\n Expected %d got %d \n",expect,result); - exit (1); - } -} - -int main(void) -{ - int result; - result = greatest(1, 2, 3); - printf("Input submitted to the function: 1, 2, 3"); - check(3, result); - result = greatest(5, 9, 2); - printf("Input submitted to the function: 5, 9, 2"); - check(9, result); - result = greatest(7, 2, 4); - printf("Input submitted to the function: 7, 2, 4"); - check(7, result); - result = greatest(11, 2, 45); - printf("Input submitted to the function: 11, 2, 45"); - check(45, result); - result = greatest(2, 7, 0); - printf("Input submitted to the function: 2, 7, 0"); - check(7, result); - result = greatest(9, 6, 5); - printf("Input submitted to the function: 9, 6, 5"); - check(9, result); - printf("All Correct\n"); - return 0; -} diff --git a/yaksh/c_cpp_files/main_hello_name.c b/yaksh/c_cpp_files/main_hello_name.c deleted file mode 100755 index 71b83a2..0000000 --- a/yaksh/c_cpp_files/main_hello_name.c +++ /dev/null @@ -1,29 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - - -void check(char expect[], char result[]) -{ - if (expect == result) - { - printf("Correct:expected %s got %s \n",expect,result); - } - else - { - printf("ERROR:expected %s got %s \n",expect,result); - exit (0); - } -} - -int main(void) -{ - char result[20]; - char A[20]=" pratham"; - char B[20]=" sir"; - result[20] = message(A); - printf("%s",result); - check("hello pratham", result); - result[20] = message(B); - check("hello sir",result); - printf("All Correct\n"); -} diff --git a/yaksh/c_cpp_files/main_lessThan9.cpp b/yaksh/c_cpp_files/main_lessThan9.cpp deleted file mode 100755 index 722b4bb..0000000 --- a/yaksh/c_cpp_files/main_lessThan9.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -extern bool lessThan9(int); - -template <class T> - -void check(T expect, T result) -{ - if (expect == result) - { - printf("\nCorrect:\n Expected %d got %d \n",expect,result); - } - else - { - printf("\nIncorrect:\n Expected %d got %d \n",expect,result); - exit (1); - } -} - -int main(void) -{ - bool result; - result = lessThan9(10); - printf("Input submitted to the function: 10"); - check(false, result); - result = lessThan9(17); - printf("Input submitted to the function: 17"); - check(true, result); - result = lessThan9(16); - printf("Input submitted to the function: 16"); - check(true, result); - result = lessThan9(15); - printf("Input submitted to the function: 15"); - check(false, result); - printf("All Correct\n"); - return 0; -} diff --git a/yaksh/c_cpp_files/main_mean.cpp b/yaksh/c_cpp_files/main_mean.cpp deleted file mode 100755 index 21a4b1a..0000000 --- a/yaksh/c_cpp_files/main_mean.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -extern bool mean(int, int , int); - -template <class T> - -void check(T expect, T result) -{ - if (expect == result) - { - printf("\nCorrect:\n Expected %d got %d \n",expect,result); - } - else - { - printf("\nIncorrect:\n Expected %d got %d \n",expect,result); - exit (1); - } -} - -int main(void) -{ - bool result; - result = mean(11, 11, 11); - printf("Input submitted to the function: 11, 121, 11"); - check(true, result); - result = mean(16, 12, 9); - printf("Input submitted to the function: 16, 144, 9"); - check(true, result); - result = mean(19, 221, 9); - printf("Input submitted to the function: 19, 221, 9"); - check(false, result); - result = mean(34, 12, 3); - printf("Input submitted to the function: 11, 121, 11"); - check(false, result); - printf("All Correct\n"); - return 0; -} diff --git a/yaksh/c_cpp_files/main_palindrome.cpp b/yaksh/c_cpp_files/main_palindrome.cpp deleted file mode 100755 index 0e66928..0000000 --- a/yaksh/c_cpp_files/main_palindrome.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -extern bool palindrome(int); - -template <class T> - -void check(T expect, T result) -{ - if (expect == result) - { - printf("\nCorrect:\n Expected %d got %d \n",expect,result); - } - else - { - printf("\nIncorrect:\n Expected %d got %d \n",expect,result); - exit (1); - } -} - -int main(void) -{ - bool result; - result = palindrome(123); - printf("Input submitted to the function: 123"); - check(false, result); - result = palindrome(121); - printf("Input submitted to the function: 121"); - check(true, result); - printf("All Correct\n"); - return 0; -} diff --git a/yaksh/c_cpp_files/main_roundTo10.cpp b/yaksh/c_cpp_files/main_roundTo10.cpp deleted file mode 100755 index 12c961d..0000000 --- a/yaksh/c_cpp_files/main_roundTo10.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -extern int roundTo10(int,int,int); - -template <class T> - -void check(T expect, T result) -{ - if (expect == result) - { - printf("\nCorrect:\n Expected %d got %d \n",expect,result); - } - else - { - printf("\nIncorrect:\n Expected %d got %d \n",expect,result); - exit (1); - } -} - -int main(void) -{ - int result; - result = roundTo10(10, 22, 39); - printf("Input submitted to the function: 10, 22, 39"); - check(70, result); - result = roundTo10(45, 42, 39); - printf("Input submitted to the function: 45, 42, 39"); - check(130, result); - result = roundTo10(7, 3, 9); - printf("Input submitted to the function: 7, 3, 9"); - check(20, result); - result = roundTo10(1, 2, 3); - printf("Input submitted to the function: 1, 2, 3"); - check(0, result); - result = roundTo10(30, 40, 50); - printf("Input submitted to the function: 30, 40, 50"); - check(120, result); - printf("All Correct\n"); - return 0; -} diff --git a/yaksh/c_cpp_files/main_specialSum.cpp b/yaksh/c_cpp_files/main_specialSum.cpp deleted file mode 100755 index d614536..0000000 --- a/yaksh/c_cpp_files/main_specialSum.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -extern int specialSum(int,int,int); - -template <class T> - -void check(T expect, T result) -{ - if (expect == result) - { - printf("\nCorrect:\n Expected %d got %d \n",expect,result); - } - else - { - printf("\nIncorrect:\n Expected %d got %d \n",expect,result); - exit (1); - } -} - -int main(void) -{ - int result; - result = specialSum(10, 2, 9); - printf("Input submitted to the function: 10, 2, 9"); - check(21, result); - result = specialSum(1, 21, 9); - printf("Input submitted to the function: 1, 21, 9"); - check(1, result); - result = specialSum(21, 2, 3); - printf("Input submitted to the function: 21, 2, 3"); - check(0, result); - result = specialSum(10, 2, 21); - printf("Input submitted to the function: 10, 2, 21"); - check(12, result); - result = specialSum(10, 2, 6); - printf("Input submitted to the function: 10, 2, 6"); - check(18, result); - printf("All Correct\n"); - return 0; -} diff --git a/yaksh/c_cpp_files/main_within.cpp b/yaksh/c_cpp_files/main_within.cpp deleted file mode 100755 index 50f9ad0..0000000 --- a/yaksh/c_cpp_files/main_within.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -extern bool within(int, int, int); - -template <class T> - -void check(T expect, T result) -{ - if (expect == result) - { - printf("\nCorrect:\n Expected %d got %d \n",expect,result); - } - else - { - printf("\nIncorrect:\n Expected %d got %d \n",expect,result); - exit (1); - } -} - -int main(void) -{ - bool result; - result = within(12, 3, 20); - printf("Input submitted to the function: 12, 3, 20"); - check(true, result); - result = within(12, 13, 20); - printf("Input submitted to the function: 12, 13, 20"); - check(false, result); - result = within(29, 13, 120); - printf("Input submitted to the function: 29, 13, 120"); - check(true, result); - result = within(12, 12, 20); - printf("Input submitted to the function: 12, 3, 20"); - check(false, result); - printf("All Correct\n"); - return 0; -} diff --git a/yaksh/java_files/main_array_sum.java b/yaksh/java_files/main_array_sum.java deleted file mode 100644 index 5eae299..0000000 --- a/yaksh/java_files/main_array_sum.java +++ /dev/null @@ -1,36 +0,0 @@ -class main_array_sum -{ - public static <E> void check(E expect, E result) - { - if(result.equals(expect)) - { - System.out.println("Correct:\nOutput expected "+expect+" and got "+result); - } - else - { - System.out.println("Incorrect:\nOutput expected "+expect+" but got "+result); - System.exit(1); - } - } - public static void main(String arg[]) - { - int result; - Test t = new Test(); - int x[] = {0,0,0,0,0}; - result = t.array_sum(x); - System.out.println("Input submitted to the function: {0,0,0,0,0}"); - check(0, result); - int a[] = {1,2,3,4,5}; - result = t.array_sum(a); - System.out.println("Input submitted to the function: {1,2,3,4,5}"); - check(15, result); - int b[] = {1,2,3,0,0}; - result = t.array_sum(b); - System.out.println("Input submitted to the function: {1,2,3,0,0}"); - check(6, result); - int c[] = {1,1,1,1,1}; - result = t.array_sum(c); - System.out.println("Input submitted to the function: {1,1,1,1,1}"); - check(5, result); - } -} diff --git a/yaksh/java_files/main_fact.java b/yaksh/java_files/main_fact.java deleted file mode 100644 index 325dab6..0000000 --- a/yaksh/java_files/main_fact.java +++ /dev/null @@ -1,29 +0,0 @@ -class main_fact -{ - public static <E> void check(E expect, E result) - { - if(result.equals(expect)) - { - System.out.println("Correct:\nOutput expected "+expect+" and got "+result); - } - else - { - System.out.println("Incorrect:\nOutput expected "+expect+" but got "+result); - System.exit(1); - } - } - public static void main(String arg[]) - { - Test t = new Test(); - int result; - result = t.factorial(0); - System.out.println("Input submitted to the function: 0"); - check(1, result); - result = t.factorial(3); - System.out.println("Input submitted to the function: 3"); - check(6, result); - result = t.factorial(4); - System.out.println("Input submitted to the function: 4"); - check(24, result); - } -} diff --git a/yaksh/java_files/main_great.java b/yaksh/java_files/main_great.java deleted file mode 100644 index 4bfcb1f..0000000 --- a/yaksh/java_files/main_great.java +++ /dev/null @@ -1,39 +0,0 @@ -class main_great -{ - public static <E> void check(E expect, E result) - { - if(result.equals(expect)) - { - System.out.println("Correct:\nOutput expected "+expect+" and got "+result); - } - else - { - System.out.println("Incorrect:\nOutput expected "+expect+" but got "+result); - System.exit(1); - } - } - public static void main(String arg[]) - { - Test t = new Test(); - int result; - result = t.greatest(1, 3, 4); - System.out.println("Input submitted to the function: 1, 3, 4"); - check(4, result); - result = t.greatest(5, 10, 3); - System.out.println("Input submitted to the function: 5, 10, 3"); - check(10, result); - result = t.greatest(6, 1, 4); - System.out.println("Input submitted to the function: 6, 1, 4"); - check(6, result); - result = t.greatest(6, 11, 14); - System.out.println("Input submitted to the function: 6, 11, 14"); - check(14, result); - result = t.greatest(3, 31, 4); - System.out.println("Input submitted to the function: 3, 31, 4"); - check(31, result); - result = t.greatest(26, 13, 3); - System.out.println("Input submitted to the function: 26, 13, 3"); - check(26, result); - - } -} diff --git a/yaksh/java_files/main_hello_name.java b/yaksh/java_files/main_hello_name.java deleted file mode 100644 index 84bb282..0000000 --- a/yaksh/java_files/main_hello_name.java +++ /dev/null @@ -1,29 +0,0 @@ -class main_hello_name -{ - public static <E> void check(E expect, E result) - { - if(result.equals(expect)) - { - System.out.println("Correct:\nOutput expected "+expect+" and got "+result); - } - else - { - System.out.println("Incorrect:\nOutput expected "+expect+" but got "+result); - System.exit(1); - } - } - public static void main(String arg[]) - { - Test t = new Test(); - String result; - result = t.hello_name("Raj"); - System.out.println("Input submitted to the function: 'Raj'"); - check("hello Raj", result); - result = t.hello_name("Pratham"); - System.out.println("Input submitted to the function: 'Pratham'"); - check("hello Pratham", result); - result = t.hello_name("Ram"); - System.out.println("Input submitted to the function: 'Ram'"); - check("hello Ram", result); - } -} diff --git a/yaksh/java_files/main_lastDigit.java b/yaksh/java_files/main_lastDigit.java deleted file mode 100644 index 05439e2..0000000 --- a/yaksh/java_files/main_lastDigit.java +++ /dev/null @@ -1,36 +0,0 @@ -class main_lastDigit -{ - public static <E> void check(E expect, E result) - { - if(result.equals(expect)) - { - System.out.println("Correct:\nOutput expected "+expect+" and got "+result+"\n"); - } - else - { - System.out.println("Incorrect:\nOutput expected "+expect+" but got "+result+"\n"); - System.exit(1); - } - } - public static void main(String arg[]) - { - Test t = new Test(); - boolean result; - result= t.lastDigit(12, 2, 13); - System.out.println("Input submitted to the function: 12, 2, 13"); - check(true, result); - result = t.lastDigit(11, 52, 32); - System.out.println("Input submitted to the function: 11, 52, 32"); - check(true, result); - result = t.lastDigit(6, 34, 22); - System.out.println("Input submitted to the function: 6, 34, 22"); - check(false, result); - result = t.lastDigit(6, 46, 26); - System.out.println("Input submitted to the function: 63"); - check(true, result); - result = t.lastDigit(91, 90, 92); - System.out.println("Input submitted to the function: 91"); - check(false, result); - - } -} diff --git a/yaksh/java_files/main_moreThan30.java b/yaksh/java_files/main_moreThan30.java deleted file mode 100644 index 7da31cb..0000000 --- a/yaksh/java_files/main_moreThan30.java +++ /dev/null @@ -1,36 +0,0 @@ -class main_moreThan30 -{ - public static <E> void check(E expect, E result) - { - if(result.equals(expect)) - { - System.out.println("Correct:\nOutput expected "+expect+" and got "+result+"\n"); - } - else - { - System.out.println("Incorrect:\nOutput expected "+expect+" but got "+result+"\n"); - System.exit(1); - } - } - public static void main(String arg[]) - { - Test t = new Test(); - boolean result; - result= t.moreThan30(30); - System.out.println("Input submitted to the function: 30"); - check(false, result); - result = t.moreThan30(151); - System.out.println("Input submitted to the function: 151"); - check(true, result); - result = t.moreThan30(66); - System.out.println("Input submitted to the function: 66"); - check(false, result); - result = t.moreThan30(63); - System.out.println("Input submitted to the function: 63"); - check(true, result); - result = t.moreThan30(91); - System.out.println("Input submitted to the function: 91"); - check(true, result); - - } -} diff --git a/yaksh/java_files/main_palindrome.java b/yaksh/java_files/main_palindrome.java deleted file mode 100644 index c0745f9..0000000 --- a/yaksh/java_files/main_palindrome.java +++ /dev/null @@ -1,29 +0,0 @@ -class main_palindrome -{ - public static <E> void check(E expect, E result) - { - if(result.equals(expect)) - { - System.out.println("Correct:\nOutput expected "+expect+" and got "+result+"\n"); - } - else - { - System.out.println("Incorrect:\nOutput expected "+expect+" but got "+result+"\n"); - System.exit(1); - } - } - public static void main(String arg[]) - { - Test t = new Test(); - boolean result; - result= t.palindrome(123); - System.out.println("Input submitted to the function: 123"); - check(false, result); - result = t.palindrome(151); - System.out.println("Input submitted to the function: 151"); - check(true, result); - result = t.palindrome(23432); - System.out.println("Input submitted to the function: 23432"); - check(true, result); - } -} diff --git a/yaksh/java_files/main_square.java b/yaksh/java_files/main_square.java deleted file mode 100644 index 5cb8c35..0000000 --- a/yaksh/java_files/main_square.java +++ /dev/null @@ -1,32 +0,0 @@ -class main_square -{ - public static <E> void check(E expect, E result) - { - if(result.equals(expect)) - { - System.out.println("Correct:\nOutput expected "+expect+" and got "+result); - } - else - { - System.out.println("Incorrect:\nOutput expected "+expect+" but got "+result); - System.exit(1); - } - } - public static void main(String arg[]) - { - Test t = new Test(); - int result, input, output; - input = 0; output = 0; - result = t.square_num(input); - System.out.println("Input submitted to the function: "+input); - check(output, result); - input = 5; output = 25; - result = t.square_num(input); - System.out.println("Input submitted to the function: "+input); - check(output, result); - input = 6; output = 36; - result = t.square_num(input); - System.out.println("Input submitted to the function: "+input); - check(output, result); - } -} diff --git a/yaksh/java_files/read_file.java b/yaksh/java_files/read_file.java deleted file mode 100644 index 21a5836..0000000 --- a/yaksh/java_files/read_file.java +++ /dev/null @@ -1,26 +0,0 @@ -class read_file -{ - public static <E> void check(E expect, E result) - { - if(result.equals(expect)) - { - System.out.println("Correct:\nOutput expected "+expect+" and got "+result); - } - else - { - System.out.println("Incorrect:\nOutput expected "+expect+" but got "+result); - System.exit(1); - } - } - public static void main(String arg[]) - { - String result = ""; - Test t = new Test(); - try{ - result = t.readFile();} - catch(Exception e){ - System.out.print(e); - } - check("2", result); - } -} diff --git a/yaksh/scilab_files/test_add.sce b/yaksh/scilab_files/test_add.sce deleted file mode 100644 index a317cdb..0000000 --- a/yaksh/scilab_files/test_add.sce +++ /dev/null @@ -1,29 +0,0 @@ -mode(-1) -exec("function.sci",-1); -i = 0 -p = add(3,5); -correct = (p == 8); -if correct then - i=i+1 -end -disp("Input submitted 3 and 5") -disp("Expected output 8 got " + string(p)) -p = add(22,-20); -correct = (p==2); -if correct then - i=i+1 -end -disp("Input submitted 22 and -20") -disp("Expected output 2 got " + string(p)) -p =add(91,0); -correct = (p==91); -if correct then - i=i+1 -end -disp("Input submitted 91 and 0") -disp("Expected output 91 got " + string(p)) -if i==3 then - exit(5); -else - exit(3); -end |