diff --git a/C++/Program 26/PrimeNo.cpp b/C++/Program 26/PrimeNo.cpp new file mode 100644 index 00000000..a8e9b66b --- /dev/null +++ b/C++/Program 26/PrimeNo.cpp @@ -0,0 +1,20 @@ +#include +using namespace std; +int main(){ + int n,k=0; + cout<<"Check the no is prime or not"<>n; + for(int i=1;i<=n;i++){ + if(n%i==0){ + k++; + } + } + if(k==2){ + cout<<"No. is Prime"; + } + else{ + cout<<"No. is not prime"; + } + + return 0; +} \ No newline at end of file diff --git a/C++/Program 26/ReadMe.md b/C++/Program 26/ReadMe.md new file mode 100644 index 00000000..f95cb40d --- /dev/null +++ b/C++/Program 26/ReadMe.md @@ -0,0 +1,7 @@ +Program to check whether the no. is prime or not + +Input: 6 +Output: No. is not prime + +Input: 5 +Output: No. is prime \ No newline at end of file diff --git a/C++/Program_26/README.md b/C++/Program_26/README.md new file mode 100644 index 00000000..ab77102f --- /dev/null +++ b/C++/Program_26/README.md @@ -0,0 +1 @@ +Program to implement Stack DataStructure Using Linked Lists \ No newline at end of file diff --git a/C++/Program_26/StacksUsingLL.cpp b/C++/Program_26/StacksUsingLL.cpp new file mode 100644 index 00000000..219da729 --- /dev/null +++ b/C++/Program_26/StacksUsingLL.cpp @@ -0,0 +1,73 @@ +//Stacks Using Linked_Lists +#include +using namespace std; +class node{ + public: + int data; + node *link; +}*top=NULL; + +void push(int x){ + node *t; + t = new node; + if(t==NULL){ + cout<<"Stack is full[Satck overflow]"<data = x; + t->link = top; + top = t; + } +} + +void display(node *p){ + while(p){ + cout<data<<" "; + p = p->link; + } + cout<link; + x = p->data; + delete p; + } + return x; + +} + +int main(){ + + int x; + char c; + while(1){ + cout<<"Choose an Operation : \n1.Push\n2.Pop\n3.Display\n4.Exit"<>c; + switch (c) + { + case '1': + cout<<"Enter the element : "; + cin>>x; + push(x); + break; + case '2': + x=pop(); + cout<<"Poped element is "< +using namespace std; +class node{ + public: + int c; + int e; + node *link; +}*P=NULL; + +void create(){ + node *last,*t; + int n; + cout<<"Enter the NUmber of Terms : "; + cin>>n; + cout<<"Enter all the Terms in coeffient and exponent form : "<> t->c >> t->e; + t->link = NULL; + if(P==NULL) + last = P = t; + else{ + last->link = t; + last = t; + } + } + +} + +double evalute(int x){ + node *t = P; + double sum = 0.0; + while(t){ + sum += t->c*pow(x,t->e); + t = t->link; + } + return sum; +} + +int main(){ + int n; + create(); + cout<<"Enter the Value of x : "; + cin>>n; + double r = evalute(n); + cout<<"The value of the polynomial expression when x = "< + + # C++ Programs + | Program No.| Question | | ------- | ------ | -| Program-01 | Program to find the maximum and minimum element in an array. | -| Program-02 | Program to find the number of occurrence of X element present in sorted array. | -| Program-03 | Program to Swap the Kth Elements of a series. | -| Program-04 | Program to find factorial of a number | -| Program-05 | Program to find the sum of the digits of the given number. | -| Program-06 | Program to find the greatest common divisor of two number. | -| Program-07 | Program to print Pascal' triangle | -| Program-08 | Program to reverse a string | -| Program-09 | Program to check if two numbers are equal without using arithmetic operators or comparison operators. -| Program-10 | Program to Reverse words in a given string -| Program-10 | Program to find the missing number in a Sorted Array. -| Program-15 | Program to find modular exponentiation. -| Program-19| To check whether a number is in palindrome or not -| Program-24 | Program to convert Hexa-Decimal number to Decimal number -| Program-25 | Program to Implement Queue Data Structure Using Linked Lists + + + +| [Program-01](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-01/Program.cpp) | Program to find the maximum and minimum element in an array. | +| [Program-02](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-2/number_of_occurrence.cpp) | Program to find the number of occurrence of X element present in sorted array. | +| [Program-03](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-3/program.cpp) | Program to Swap the Kth Elements of a series. | +| [Program-04](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-4/program.cpp) | Program to find factorial of a number | +| [Program-05](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-5/program.cpp) | Program to find the sum of the digits of the given number. | +| [Program-06](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-6/program.cpp) | Program to find the greatest common divisor of two number. | +| [Program-07](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-7/program.cpp) | Program to print Pascal' triangle | +| [Program-08](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-8/program.cpp) | Program to reverse a string | +| [Program-09](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-9/program.cpp) | Program to check if two numbers are equal without using arithmetic operators or comparison operators. +| [Program-10](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-10/program.cpp) | Program to find the missing number in a Sorted Array. +| [Program-11](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program11/Program11.cpp) | Program to Camel case an input sentence | +| [Program-12](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-12/program.cpp) | Find the First non repeating character index +| [Program-13](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-13/program.cpp) | Find the longest Palindromic Substring | +| [Program-14](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-14/program.cpp) | Find the Maximum Product of the Subarray | +| [Program-15](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-15/program.cpp) | Program to find modular exponentiation. | +| [Program-16](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-16/rightangle.cpp) | Program for right angled patterns | +| [Program-17](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-17/randomcolorscreen.cpp) | Program to print random texts with colour | +| [Program-18](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-18/getWeekday.cpp) | Program to get weekday with given day. | +| [Program-19](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/program-19/palindrome.cpp) | To check whether a number is in palindrome or not | +| [Program-20](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-20/program.cpp) | To find the square root of a number upto "p" no of places | +| [Program-21](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program-21/program.cpp) | Last digit of sum of partial Fibonacci Series | +| [Program-22](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program%2022/adding_two_string.cpp) | Program to add Two Binary Number Input | +| [Program-23](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program%2023/sum_of_square_of_binomial_coefficient.cpp) | To find the sum of square of binomial coefficient Input(integer input) | +| [Program-24](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program_24/HexaDecimal-Decimal.cpp) | Program to convert Hexa-Decimal number to Decimal number +| [Program-25](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C++/Program_25/Queues_Using_Linked_Lists.cpp) | Program to Implement Queue Data Structure Using Linked Lists + + +
diff --git a/C/README.md b/C/README.md index 718a4f7d..72058de2 100644 --- a/C/README.md +++ b/C/README.md @@ -2,78 +2,87 @@ ## This repo contains basics programs in c programming language. | Program No.| Question | | ------- | ------ | -| Program-01 | Program to print pattern | -| Program-02 | Program to check whether the given number is prime or not | -| Program-03 | Program to find largest of three number using simple if condition | -| Program-04 | Program to find largest of three number using if-else condition | -| Program-05 | Program to find largest of three number using nested if condition | -| Program-06 | Program to find largest of three number using ternary operator | -| Program-07 | Program to check whether the given year is leap or not | -| Program-08 | Program to convert number into year, months and days | -| Program-09 | Program to check two number are equal without logical operator | -| Program-10 | Program to find square and half of given number without using built-in function and arithmetic operator| -| Program-11 | Program on arithmetic operators | -| Program-12 | Program on relational operators | -| Program-13 | Program on bit-wise operator. | -| Program-14 | Program on increment and decrement operator. | -| Program-15 | Program to find sum of digits between given range which are divisible by 3 | -| Program-16 | Program to check whether the given number is neon or not | -| Program-17 | Program to check whether the given number is prefect or not | -| Program-18 | Program to check given number is Armstrong or not | -| Program-19 | Program to find power of a given number | -| Program-20 | Program to convert datatype explicitly | -| Program-21 | Program to check whether the given number is prime or not | -| Program-22 | Program to find GCD and LCM of given two number | -| Program-23 | Program to find number of digits in a given number | -| Program-24 | Program to print the pattern | -| Program-25 | Program to print the pattern | -| Program-26 | Program to print the pattern | -| Program-27 | Program to print the pattern | -| Program-28 | Program to print the pattern | -| Program-29 | Program to print the pattern | -| Program-30 | Program to print the pattern | -| Program-31 | Program to take the details of student and print the details of students using array and to add details of new students into the existing array | -| Program-32 | Program to take the details of student and print the details | -| Program-33 | Program on Arithematic operation using pointers | -| Program-34 | Program to determine whether the matrix is a triangular matrix. First, you will be given N, which is the size of the matrix. Then you will be given N rows of integers, where each row consists of N integers separated by spaces. If the input matrix is triangular, then print yes. Otherwise, print no. | -| Program-35 | Program where you are given a sequence of non-negative integers terminated by -1. You have to output 1 if there are atleast 2 distinct elements in the sequence and 0 if the sequence consists of only 1 integer. Note that -1 is not part of the sequence. The sequence is not necessarily sorted. | -| Program-36 | Program to output the number of distinct elements in the sorted sequence | -| Program-37 | Program to find the fibonacci sequnce using recursion | -| Program-38 | Program to find the factorial of a number using recursion | -| Program-39 | Program to find the GCD of a number using recursion | -| Program-40 | Program to find the ackerman of given two numbers| -| Program-41 | Program to find sum of two numbers without using any operator | -| Program-42 | Program to print Floyd’s triangle Without using a temporary variable and with only one loop | -| Program-43 | Program for printing the hollow triangle pattern | -| Program-44 | Program for implementation of the approach | -| Program-45 | Program to illustrate the above given pattern of numbers. | -| Program-46 | Program to convert binary number to decimal | -| Program-47 | Program to find the maximum and minimum element in an array| -| Program-48 | Program to check if a number is even or odd | -| Program-49 | Program to find the sum of the digits of the given number | -| Program-50 | Program to check whether a given number is a palindrome or not | -| Program-51 | Program to print duplicates in an array | -| Program-52 | Program to find whether the given element is present in the array or not | -| Program-53 | Program to find the position of an element in an array | -| Program-54 | Program to check whether two strings are anagrams or not | -| Program-55 | Program to print print a number in binary | -| Program-56 | Program to calculate the number of vowels and consonants in a string | -| Program-57 | Program to calculate the grade | -| Program-58 | Program to find the sum of elements between indexes | -| Program-59 | Program to Search Students details in a list | -| Program-60 | Program to print kaprekar number in a given range | -| Program-61 | Program to find the all the prime numbers between the given range. | -| Program-62 | Program to calculate the average of 5 numbers. | -| Program-63 | Program to print Pascal's Triangle. | -| Program-64 | Program to check Armstrong number. | -| Program-65 | Program to Find Transpose of a Matrix | -| Program-66 | Program to find fibonacci series upto n values in C language. | -| Program-67 | Program to calulate all the prime between the range of numbers includes the numbers which is provided. | -| Program-68 | Program to accept 0s and 1s as input and print if it consists 3 consecutive 0s | -| Program-69 | Program to find strong number | -| Program-70 | Program to make a simple calculator | -| Program-71 | Program to implement stack using array & linked list | -| Program-72 | Program to implement stack using linked list | -| Program-73 | Program to implement stack using array | +| [Program-01](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-1/program.c) | Program to print pattern | +| [Program-02](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-2/program.c) | Program to check whether the given number is prime or not | +| [Program-03](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-3/program.c) | Program to find largest of three number using simple if condition | +| [Program-04](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-4/program.c) | Program to find largest of three number using if-else condition | +| [Program-05](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-5/program.c) | Program to find largest of three number using nested if condition | +| [Program-06](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-6/program.c) | Program to find largest of three number using ternary operator | +| [Program-07](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-7/program.c) | Program to check whether the given year is leap or not | +| [Program-08](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-8/program.c) | Program to convert number into year, months and days | +| [Program-09](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-9/program.c) | Program to check two number are equal without logical operator | +| [Program-10](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-10/program.c) | Program to find square and half of given number without using built-in function and arithmetic operator| +| [Program-11](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-11/program.c) | Program on arithmetic operators | +| [Program-12](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-12/program.c) | Program on relational operators | +| [Program-13](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-13/program.c) | Program on bit-wise operator. | +| [Program-14](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-14/program.c) | Program on increment and decrement operator. | +| [Program-15](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-15/program.c) | Program to find sum of digits between given range which are divisible by 3 | +| [Program-16](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-16/program.c) | Program to check whether the given number is neon or not | +| [Program-17](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-17/program.c) | Program to check whether the given number is prefect or not | +| [Program-18](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-18/program.c) | Program to check given number is Armstrong or not | +| [Program-19](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-19/program.c) | Program to find power of a given number | +| [Program-20](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-20/program.c) | Program to convert datatype explicitly | +| [Program-21](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-21/program.c) | Program to check whether the given number is prime or not | +| [Program-22](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-22/program.c) | Program to find GCD and LCM of given two number | +| [Program-23](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-23/program.c) | Program to find number of digits in a given number | +| [Program-24](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-24/program.c) | Program to print the pattern | +| [Program-25](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-25/program.c) | Program to print the pattern | +| [Program-26](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-26/program.c) | Program to print the pattern | +| [Program-27](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-27/program.c) | Program to print the pattern | +| [Program-28](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-28/program.c) | Program to print the pattern | +| [Program-29](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-29/program.c) | Program to print the pattern | +| [Program-30](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-30/program.c) | Program to print the pattern | +| [Program-31](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-31/program.c) | Program to take the details of student and print the details of students using array and to add details of new students into the existing array | +| [Program-32](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-32/program.c) | Program to take the details of student and print the details | +| [Program-33](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-33/program.c) | Program on Arithematic operation using pointers | +| [Program-34](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-34/program.c) | Program to determine whether the matrix is a triangular matrix. First, you will be given N, which is the size of the matrix. Then you will be given N rows of integers, where each row consists of N integers separated by spaces. If the input matrix is triangular, then print yes. Otherwise, print no. | +| [Program-35](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-35/program.c) | Program where you are given a sequence of non-negative integers terminated by -1. You have to output 1 if there are atleast 2 distinct elements in the sequence and 0 if the sequence consists of only 1 integer. Note that -1 is not part of the sequence. The sequence is not necessarily sorted. | +| [Program-36](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-36/program.c) | Program to output the number of distinct elements in the sorted sequence | +| [Program-37](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-37/program.c) | Program to find the fibonacci sequnce using recursion | +| [Program-38](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-38/program.c) | Program to find the factorial of a number using recursion | +| [Program-39](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-39/program.c) | Program to find the GCD of a number using recursion | +| [Program-40](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-40/program.c) | Program to find the ackerman of given two numbers| +| [Program-41](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-41/program.c) | Program to find sum of two numbers without using any operator | +| [Program-42](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-42/program.c) | Program to print Floyd’s triangle Without using a temporary variable and with only one loop | +| [Program-43](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-43/program.c) | Program for printing the hollow triangle pattern | +| [Program-44](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-44/program.c) | Program for implementation of the approach | +| [Program-45](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-45/program.c) | Program to illustrate the above given pattern of numbers. | +| [Program-46](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-46/program.c) | Program to convert binary number to decimal | +| [Program-47](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-47/program%2047.c) | Program to find the maximum and minimum element in an array| +| [Program-48](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-48/program.c) | Program to check if a number is even or odd | +| [Program-49](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-49/program.c) | Program to find the sum of the digits of the given number | +| [Program-50](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-50/program.c) | Program to check whether a given number is a palindrome or not | +| [Program-51](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-51/program.c) | Program to print duplicates in an array | +| [Program-52](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-52/program.c) | Program to find whether the given element is present in the array or not | +| [Program-53](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-53/program.c) | Program to find the position of an element in an array | +| [Program-54](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-54/program.c) | Program to check whether two strings are anagrams or not | +| [Program-55](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-55/program.c) | Program to print print a number in binary | +| [Program-56](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-56/program.c) | Program to calculate the number of vowels and consonants in a string | +| [Program-57](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-57/program.c) | Program to calculate the grade | +| [Program-58](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-58/Program.c) | Program to find the sum of elements between indexes | +| [Program-59](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-59/program.c) | Program to Search Students details in a list | +| [Program-60](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-60/program.c) | Program to print kaprekar number in a given range | +| [Program-61](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-61/program.c) | Program to find the all the prime numbers between the given range. | +| [Program-62](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-62/program.c) | Program to calculate the average of 5 numbers. | +| [Program-63](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-63/program.c) | Program to print Pascal's Triangle. | +| [Program-64](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-64/ArmstrongNumber.c) | Program to check Armstrong number. | +| [Program-65](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-65/program.c) | Program to Find Transpose of a Matrix | +| [Program-66](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-66/fibonacciSeries.c) | Program to find fibonacci series upto n values in C language. | +| [Program-67](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-67/program.c) | Program to calulate all the prime between the range of numbers includes the numbers which is provided. | +| [Program-68](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-68/program-68.c) | Program to accept 0s and 1s as input and print if it consists 3 consecutive 0s | +| [Program-69](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-69/strongNumber.c) | Program to find strong number | +| [Program-70](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-70/program70.c) | Program to make a simple calculator | +| [Program-71](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-71/program.c) | Program to implement stack using array & linked list | +| [Program-72](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-72/program.c) | Program to implement stack using linked list | +| Program-73 | - | +| [Program-74](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-74/program.c) | C Program to reverse a given number +| Program-75 | - | +| Program-76 | - | +| [Program-77](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-77/program.c) | C program to multiply matrices +| [Program-78](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-78/program.c) | Program to find the Area of Triangle using Base and Height +| [Program-79](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-79/program.c) | Program to calculate Simple Interest +| [Program-80](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/C/program-80/program.c) | Program to calulate all the prime between the range of numbers +
+ diff --git a/Dart/README.md b/Dart/README.md index a89a4896..997afbda 100644 --- a/Dart/README.md +++ b/Dart/README.md @@ -1 +1,7 @@ +
+ # Dart +| Program No.| Question | +| ------- | ------ | +| [Program-1](https://github.com/NamanManjkhola/basicprograms/blob/780344803c8bc91a4a83acaa60c81f982a3df760/Dart/Program1/checkevenodd.dart) | Program to check given number is even or odd. +
diff --git a/Java/Readme.md b/Java/Readme.md index 1e3b1861..210a50d1 100644 --- a/Java/Readme.md +++ b/Java/Readme.md @@ -1,16 +1,23 @@ -Method Overloading in Java with examples -| FILED UNDER: OOPS CONCEPT - -Method Overloading is a feature that allows a class to have more than one method having the same name, if their argument lists are different. It is similar to constructor overloading in Java, that allows a class to have more than one constructor having different argument lists. - -let’s get back to the point, when I say argument list it means the parameters that a method has: For example the argument list of a method add(int a, int b) having two parameters is different from the argument list of the method add(int a, int b, int c) having three parameters. - - -QUESTION:- - -Program to find area of Square, Rectangle and Circle using Method Overloading - -Output: -Area of the square: 37.21 sq units -Area of the rectangle: 220.0 sq units -Area of the circle: 116.8394 sq units \ No newline at end of file +
+ + # Java Programs + +| Program No.| Question | +| ------- | ------ | +| [Program-1](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/program-1/program.java) | Program to find the maximum and minimum element in an array +| [Program-2](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/program-2/program.java) | Check if a string is a palindrome or not. +| [Program-3](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/program-3/program.java) | Program in java to count the number of consonants and vowels in a string +| [Program-4](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/program-4/program.java) | Program to check that given two strings are Anagram or not(lowercase input) +| [Program-5](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/Program%205/program.java.txt) | Check if the given no. is part of the fibonacci series +| [Program-6](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/Program%206/program.java.txt) | Check if the given no. is a spy no. or not +| [Program-7](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/program-7/program.java) | Program that mixes a deck of cards in spanish +| [Program-8](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/Program-8/program.java) | Java Program to Find if a Given Year is a Leap Year +| [Program-9](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/program-9/program.java) | Program to Check If a Number is Neon Number or Not +| [Program-10](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/program-10/Program.java) | Program for simple interest +| [Program-11](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/Program-11/Program.java) | Program for compound interest +| [Program-12](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/Program-12/Program-12.java) | Print number of vowels and consonants in a string +| [Program-13](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Java/Program-13/Program%20Number%20to%20Word.java) | Program to convert number into words + +
+ +
diff --git a/Javascript/README.md b/Javascript/README.md new file mode 100644 index 00000000..52039389 --- /dev/null +++ b/Javascript/README.md @@ -0,0 +1,25 @@ +
+ + # Javascript Programs + +| Program No.| Question | +| ------- | ------ | +| [Program-1](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Javascript/program-1/program-1.html) | Program for adding two numbers +| [Program-2](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Javascript/program-2/program-2.html) | Program for string operations +| [Program-3](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Javascript/program-3/program-3.html) | Program for armstrong number +| [Program-4](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Javascript/program-4/program-4.html) | Program for palindrome +| [Program-5](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Javascript/program-5/program-5.html) | Program for mathematical operations +| [Program-6](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Javascript/program-6/program-6.html) | Program for character processing +| [Program-7](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Javascript/program-7/program.js) | Program for string searching +| [Program-8](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Javascript/program-8/program-8.html) | Program for javascript function basic +| [Program-9](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Javascript/program-9/program-9.html) | Javascript writing into html output +| [Program-10](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Javascript/program-10/program-10.html) | Javascript program for javascript writing into an html element +| [Program-11](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Javascript/program-11/program.js) | Check if a given word is an isogram or not +| [Program-12](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Javascript/program-12/program.js) | Common elements between 2 arrays and basic operators +| [Program-13](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Javascript/program-13/program.js) | Asyncronous function program +| [Program-14](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Javascript/program-14/program.js) | Create multiple objects with same body using a constructor function +| [Program-15](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Javascript/program-15/program.js) | Classes in Javascript + +
+ +
diff --git a/Python/README.md b/Python/README.md index ea61a89e..8924d10d 100644 --- a/Python/README.md +++ b/Python/README.md @@ -2,35 +2,45 @@ ## This repo contains basics programs in Python programming language. | Program No.| Question | | ------- | ------ | -| Program-01 | Program to print Hello World. | -| Program-02 | Program to find the factorial of a number. | -| Program-03 | Program to find if the string is Palindrom or not. | -| Program-04 | Program to find sum of two numbers. | -| Program-05 | Program to print a pattern. | -| Program-06 | Program to print a pattern. | -| Program-07 | Program to print a pattern. | -| Program-08 | Program to print a pattern. | -| Program-09 | Program to check if the number is armstrong or not. | -| Program-10 | Program to shuffle a deck of cards. | -| Program-11 | Program to print fibonacci series. | -| Program-12 | Program to check if a number is prime or not. | -| Program-13 | Program to find a number in an array using binary search. | -| Program-14 | Program to find simple interest for given principal amount, time and rate of interest. | -| Program-15 | Program to sort the array and give the time to sort the array. | -| Program-16 | Program to print a right angled triangle. | -| Program-17 | Program to convert Binary to Decimal. | -| Program-18 | Program to check leap year or not. | -| Program-19 | Program to count number of integers between 1 to 50 divisible by a number. | -| Program-20 | Program to create an array of range specified and print. | -| Program-21 | Program to print the number of *. | -| Program-22 | Program to check if a number is even or odd | -| Program-23 | Program to find the all the prime numbers between the given range. | -| Program-24 | Program to convert binary number to decimal | -| Program-25 | Program of a car game which shows if the car has started or stopped | -| Program-26 | Program of a guessing game in which u guess the secret number with a guessing limit of 3 attempts. | -| Program-27 | Program which tells you the of downpayment of the house is 10% or 20% depending if the owner has a good credit or not.The price of the house is to be entered in the output | -| Program-28 | Program to find out the GCD of any 2 given numbers | -| Program-29 | Program which will display the fibonacci series | -| Program-30 | Program to make simple calculator | -| Program-31 | Program to print Amstrong numbers | -| Program-32 | Program to implement menu-driven list implementation like traversal, inserting single/multiple element, deletion with index/value | +| [Program-01](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-1/program.py) | Program to print Hello World. | +| [Program-02](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-2/program.py) | Program to find the factorial of a number. | +| [Program-03](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/Program-3/program.py) | Program to find if the string is Palindrom or not. | +| [Program-04](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-4/program.py) | Program to find sum of two numbers. | +| [Program-05](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-5/program.py) | Program to print a pattern. | +| [Program-06](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-6/program.py) | Program to print a pattern. | +| [Program-07](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-7/program.py) | Program to print a pattern. | +| [Program-08](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-8/program.py) | Program to print a pattern. | +| [Program-09](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-9/program.py) | Program to check if the number is armstrong or not. | +| [Program-10](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-10/program.py) | Program to shuffle a deck of cards. | +| [Program-11](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-11/program.py) | Program to print fibonacci series. | +| [Program-12](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-12/program.py) | Program to check if a number is prime or not. | +| [Program-13](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-13/program.py) | Program to find a number in an array using binary search. | +| [Program-14](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-14/program.py) | Program to find simple interest for given principal amount, time and rate of interest. | +| [Program-15](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-15/program.py) | Program to sort the array and give the time to sort the array. | +| [Program-16](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-16/program.py) | Program to print a right angled triangle. | +| [Program-17](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-17/program.py) | Program to convert Binary to Decimal. | +| [Program-18](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-18/program.py) | Program to check leap year or not. | +| [Program-19](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-19/program.py) | Program to count number of integers between 1 to 50 divisible by a number. | +| [Program-20](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-20/program.py) | Program to create an array of range specified and print. | +| [Program-21](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/Program%2021/Program%2021.py.txt) | Program to print the number of *. | +| [Program-22](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/Program%2022/Program%2022.py.txt) | Program to check if a number is even or odd | +| [Program-23](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/Program%2023/Program%2023.py.txt) | Program to find the all the prime numbers between the given range. | +| [Program-24](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/Program%2024/Program%2024.txt) | Program to convert binary number to decimal | +| [Program-25](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/Program%2025/Program%2025.py.txt) | Program of a car game which shows if the car has started or stopped | +| [Program-26](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/Program%2026/Program%2026.py.txt) | Program of a guessing game in which u guess the secret number with a guessing limit of 3 attempts. | +| [Program-27](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/Program%2027/Program%2027.txt) | Program which tells you the of downpayment of the house is 10% or 20% depending if the owner has a good credit or not.The price of the house is to be entered in the output | +| [Program-28](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/Program%2028/Program%2028.txt) | Program to find out the GCD of any 2 given numbers | +| [Program-29](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/Program%2029/Program%2029.py) | Program which will display the fibonacci series | +| [Program-30](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/Program%2030/program.py) | Program to make simple calculator | +| [Program-31](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/Program%2031/Program%2031.py) | Program to print Amstrong numbers | +| [Program-32](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/Program%2032/Program32.py) | Program to implement menu-driven list implementation like traversal, inserting single/multiple element, deletion with index/value | +| [Program-33](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/Program33/Program33.py) | Program to find HCF +| [Program-34](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/Program34/Program34.py) | Program to display calender +| [Program-35](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/Program%2035/Program35.py) | Program to search an element in a Circular Linked List +| Program-36 | - | +| Program-37 | - | +| Program-38 | - | +| Program-39 | - | +| [Program-40](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/Python/program-40/BasicGraphs.py) | Graph pictorial representation of set of objects + +
diff --git a/kotlin/README.md b/kotlin/README.md index f9d85e6f..282dd5fa 100644 --- a/kotlin/README.md +++ b/kotlin/README.md @@ -1 +1,8 @@ +
+ # Kotlin +| Program No.| Question | +| ------- | ------ | +| [Program-1](https://github.com/swaaz/basicprograms/blob/814a1e60ae23d81158d8174666f23c9b7419e15e/kotlin/Program1/pattern.kt) | Write a program to print half pyramid using ' * ' + +