Skip to content

Instantly share code, notes, and snippets.

View aadipoddar's full-sized avatar
🏠
Working from home

Aadi Poddar aadipoddar

🏠
Working from home
View GitHub Profile
@aadipoddar
aadipoddar / PrimeTriplet.java
Last active February 18, 2022 14:41
Print Prime Triplet Integers between a given range
/*
A prime triplet is a collection of three Prime Numbers in the form
(p, p + 2, p + 6) or (p, p + 4, p + 6)
Write a program to input M and N where M < N and , M and N less than 50.
Find and Display all the possible Prime Triplets in the range M and N
where the value of M and N entered by the user.
Eg:
INPUT :
@aadipoddar
aadipoddar / DiagonalSum.java
Created February 14, 2022 08:35
Sum of Diagonals and Symmetric Matrix
/*
Write a Program to input a square Matrix of size between 2 to 10.
Find if the Matrix is symmetric or not.
Find the Sum to the Diagonals of the Matrix
EG:
INPUT:
Size : 3
OUTPUT:
@aadipoddar
aadipoddar / Flutter Workflow.yaml
Created February 16, 2022 17:10
This is a complete Workflow file for Flutter apps. It supports build and release for all platforms.
name: Flutter Test Analysis Build
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
flutter_test:
@aadipoddar
aadipoddar / LuckyNumber.java
Created March 31, 2022 15:01
Generate and print lucky Number for a Given Number N.
/*
Generate and print lucky Number for a Given Number N
INPUT: 25
OUTPUT:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
1 3 5 7 9 11 13 15 17 19 21 23 25... eleminate the 2nd number from the list
1 3 7 9 13 15 19 21 25... eleminate the 3rd number from the list
1 3 7 13 15 19 25... eleminate the 4th number from the list
@aadipoddar
aadipoddar / PrimeCheckRecursive.java
Created April 7, 2022 13:18
Program to check whether the number is prime or not using recursion.
/*
Write a program to accept a number using int accept() function
and check whether the number is prime or not using recursion.
*/
import java.util.*;
class PrimeCheckRecursive {
int accept() {
@aadipoddar
aadipoddar / FactorialRecursion.java
Created April 7, 2022 13:34
Calculate the factorial of that number using recursion
/*
Write a program to accept a number
and calculate the factorial of that number using recursion.
INPUT: 5
OUTPUT: 5 * 4 * 3 * 2 * 1 = 120
*/
import java.util.*;
@aadipoddar
aadipoddar / SumDigitRecursion.java
Created April 7, 2022 13:34
Find the sum of its digits using recursion
/*
Write a program to accept a number
and find the sum of its digits using recursion.
INPUT: 23567
OUTPUT: 2+3+5+6+7 = 23
*/
import java.util.*;
@aadipoddar
aadipoddar / VowelsRecursion.java
Created April 7, 2022 14:01
Count Vowels Using Recursion
/*
Write a program to accept a word using String accept() function
and count the number of vowels in the word using int vowels(String, int) recursive function
and display the word and the frequency of vowels in the word using void display(String, int) function.
*/
import java.util.Scanner;
class VowelsRecursion {
@aadipoddar
aadipoddar / PerfectNumber.java
Created April 7, 2022 14:21
Check Perfect Number Using Recursion
/*
Write a program to accept a number
and print the number is a perfect number or not using a recursion
and print the result.
INPUT: 6
OUTPUT: 6 is a perfect number
*/
import java.util.Scanner;
@aadipoddar
aadipoddar / WordsCountRecursion.java
Created April 7, 2022 15:10
Count The Number of words in the Sentence using Recursion.
/*
Write a program to accept a sentence
and the number of words in the sentence.
INPUT: Kolkata is a nice City
OUTPUT: Number of Words: 5
*/
import java.util.Scanner;