What is SSH?

The Secure Shell (SSH) protocol, also known as Secure Shell or Secure Socket Shell, is a network protocol that allows administrators to access computers over unsecured networks in a secure manner. SSH is also a suite of utilities for implementing the SSH protocol in addition to providing secure network access. The SSH suite consists of …

What is SSH? Read More »

Force Kill process in Linux

Ever came across a situation where you run an application and suddenly it stops responding? The most reliable thing to do in such a case would be to shut down the running application and re-start the process, right? But what if you’re not able to kill the running process completely! In such a scenario, you …

Force Kill process in Linux Read More »

WRITE A PROGRAM TO PRINT A BINARY RIGHT ANGLED TRIANGLE UPTO N TERMS IN JAVA

class Btri { public static void main(String args[])         {             int i, j,n;           n=Integer.parseInt(args[0]);                          for (i = 1; i <= n; i++)             {                 for (j = 1; j <= i; j++)                 {                     if (j % 2 == 0)                     {                         System.out.print(“0 “);                     }                     else                     {                         System.out.print(“1 “);                     }                 }                     System.out.println(“”);             }          }       } OUTPUT:

WRITE A PROGRAM TO CHECK WHETHER A NUMBER IS ARMSTRONG NUMBER OR NOT IN JAVA

class ArmstrongNumber  {     public static void main(String args[])      {         int n, temp , r, s=0 ;         n=Integer.parseInt(args[0]);         temp = n;         while (temp != 0)        {             r = temp % 10;             s = s + (r * r * r);             temp = temp / 10;         }         if (n== s)        {             System.out.println(” It is an Armstrong Number”); …

WRITE A PROGRAM TO CHECK WHETHER A NUMBER IS ARMSTRONG NUMBER OR NOT IN JAVA Read More »

WRITE A PROGRAM TO FIND THE FIBONACCI SERIES UPTO N TERMS IN JAVA

class Fibonacci { public static void main(String args[]) { int num = Integer.parseInt(args[0]);  System.out.println(“**Fibonacci Series**”); int f1, f2=0, f3=1; for(int i=1;i<=num;i++) { System.out.print(” “+f3+” “); f1 = f2; f2 = f3; f3 = f1 + f2; } } } OUTPUT:

WRITE A PROGRAM TO FIND THE PRIME NUMBERS BETWEEN 1 TO 100 In JAVA.

class prime  {      public static void main(String args[])      {          int i,k,j;          for(i=1;i<100;i++)          {              k=0;              for(j=2;j<i;j++)              {                  if(i%j==0)                  {                      k=1;                      break;                  }              }              if(k==0)              {                  System.out.print(” “+i);              }          }      }  } OUTPUT: