write a program to find sum of 5 short type variable

class second
{
public static void main(String args[])
{
short a=5,b=10,c=2,d=6,e=9,SUM;
SUM = (short) (a+b+c+d+e);
System.out.println("SUM is " + SUM);
}
}

0 comments:

Post a Comment