# Source Codes

1 Comment

## Java program to Find Factorial of Given no.

1 2 3 4 5 6 7 8 9 10 11 class Factorial{ public static void main(String args[]){ int num = Integer.parseInt(args); //take argument as command line int result = 1; while(num>0){ result = result * num; num–; } System.out.println("Factorial of Given no. is : "+result); } }

## Java program to find SUM AND PRODUCT of a given Digit.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 class Sum_Product_ofDigit{ public static void main(String args[]){ int num = Integer.parseInt(args); //taking value as command line argument. int temp = num,result=0; //Logic for sum of digit while(temp>0){ result = result + temp; temp–; } […]

1 Comment

## Java program to display a greet message according to student marks

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 26 27 28 29 30 31 32 33 34 35 36 37 38 /* Write a program to display a greet message according to Marks obtained by student. */ class […]

## Java program to generate 5 Random nos. between 1 to 100

1 2 3 4 5 6 7 8 9 10 /*Write a program to generate 5 Random nos. between 1 to 100, and it should not follow with decimal point. */ class RandomDemo{ public static void main(String args[]){ for(int i=1;i<=5;i++){ System.out.println((int)(Math.random()*100)); } } }

## Java program to print Small Integer, Largest Integer

1 2 3 4 5 6 7 8 9 10 11 12 13 14 /* Write a program that will read a float type value from the keyboard and print the following output. ->Small Integer not less than the number. ->Given Number. ->Largest Integer not greater than the number. */ class ValueFormat{ public static void […]

## Java program to find Minimum of 2 nos. using conditional operator

1 2 3 4 5 6 7 8 9 10 class Minof2{ public static void main(String args[]){ //taking value as command line argument. //Converting String format to Integer value int i = Integer.parseInt(args); int j = Integer.parseInt(args); int result = (i<j)?i:j; System.out.println(result+" is a minimum value"); } }

## Java program to find Maximum of 2 nos

1 2 3 4 5 6 7 8 9 10 11 12 class Maxof2{ public static void main(String args[]){ //taking value as command line argument. //Converting String format to Integer value int i = Integer.parseInt(args); int j = Integer.parseInt(args); if(i > j) System.out.println(i+" is greater than "+j); else System.out.println(j+" is greater than "+i); } }

## C++ program to implement Heap sort Algorithm

#include <iostream.h> const int MAX = 10 ; class array { private : int arr[MAX] ; int count ; public : array( ) ; void add ( int num ) ; void makeheap(int ) ; void heapsort( ) ; void display( ) ; } ; array :: array( ) { count = 0 ; for […]

## C++ program to implement Quick sort Algorithm using class

#include <iostream.h> const int MAX = 10 ; class array { private :   int arr[MAX] ; int count ; public :   array( ) ; void add ( int item ) ; int getcount( ) ; static int split ( int *, int, int ) ; void quiksort ( int lower, int upper ) […] ### Research Papers ### Projects 