A number is said to be even if it is divisible by 2.  otherwise odd. Let us now see an example of a java program to determine whether the given number is an odd or even number. Algorithm: Step 1: Start. Step 2:  Read n. Step 3:  if n%2 ==… Continue Reading Java program to check whether the given number is even or odd

A series of numbers in which each number is the sum of the two preceding numbers. for example 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 etc. The first two numbers of fibonacci series are 0 and 1. Algorithm: Step 1: START. Step 2: Declare variables a,b,c.… Continue Reading Java program to Generate Fibonacci sequence

A number is said to be prime if it is divisible by 1 and itself. otherwise it is composite. Algorithm Step 1: START. Step 2: read the number n. Step 3: Check the divisibility of the number from 2 to n/2. Step 4: If number is divisible by any of… Continue Reading Java program to check whether the given number is prime or not

In this Program the user is asked to enter two numbers. Based on the numbers the division of two numbers is per Algorithm: Step 1: Start. Step 2: Declare variables, say a, b and c. Step 3: c = a/b; Step 4: Display result. Step 5: Stop. Source code:

Continue Reading Java program for Division of two numbers

In this program user is asked to enter two integers and the sum operation is performed. Source code:

Output: C:\Users\Desktop\new>javac  Add.javaC:\Users\Desktop\new>java Add *** www.programmingposts.com *** << Addition of two numbers without using Third Variable >> Enter first number to be added: 9 Enter Second number to be added: 6… Continue Reading Java Program to add two numbers without using third variable

In this Programming Post, we will see an example program to get string of comma separated values from DataTable Column in C#.Net. Generally while working with DataTable, we may need to generate a comma (or any delimiter) separated string and even we may need to generate comma separated values with single… Continue Reading Get Comma (delimiter) Separated String from DataTable Column Values in C#.Net

C PROGRAM TO FIND COUNT OF DUPLICATE ELEMENTS IN AN ARRAY In this post we will see a simple C program to find the count of duplicate elements in an Array. In below program we will get the count of elements that are duplicated i.e. elements that are occurred more… Continue Reading C Program to count duplicate / repeated elements in an array

In this post we will see, generating a Financial Year string based on the given date. I have given code in C#.Net and VB.Net. C#.Net Method to Get Financial Year of a given Date :     /// <summary>     /// Method to Get Financial Year of a given Date    … Continue Reading Get Financial Year of a given Date in C#.Net / VB.Net