Bluehost Review

BlueHost is comparably any old company which was established way back in the year 1996 and it is been 15 years since it’s been imparting the service. Its enriching past is a live testimony of the exemplary service which it imparts. It is important to let everyone know about the BlueHost web hosting features in …

Bluehost Review Read More »

C++ program to swap two numbers using class

#include<iostream.h> #include<conio.h> class swap { int a,b; public: void getdata(); void swapv(); void display(); }; void swap::getdata() { cout<<“Enter two numbers:”; cin>>a>>b; } void swap::swapv() { a=a+b; b=a-b; a=a-b; } void swap::display() { cout<<“a=”<<a<<“tb=”<<b; } main() { clrscr(); swap s; s.getdata(); cout<<“nBefore swap:n”; s.display(); s.swapv(); cout<<“nnAfter swap:n”; s.display(); getch(); return 0; }

Program to Reverse Number in Java

Here you will learn how to reverse number in java with a program example. For example given number is 1478 then its reverse will be 8741. Program to Reverse Number in Java package com; import java.util.Scanner; class Reverse { public static void main(String…s) { int n,rev=0,i; Scanner sc = new Scanner(System.in); System.out.println(“Enter any number: “); …

Program to Reverse Number in Java Read More »

Program for Factorial in Java

Here you will get program for factorial in java. We can find factorial of any number by multiplying it with all the numbers below it. For example, factorial of 4 is 4*3*2*1 = 24. Program for Factorial in Java package com; import java.util.Scanner; class Factorial { public static void main(String…s) { int n,fac=1,i; Scanner sc …

Program for Factorial in Java Read More »

Number Palindrome in Java

Here you will learn about number palindrome in java. A number is called palindrome if it is equal to its reverse. For example 1221 is a palindrome while 1234 is not palindrome. Below I have shared the java program to check given number is palindrome or not. Also Read: String Palindrome in Java   Program …

Number Palindrome in Java Read More »