write a program to print the sum of three given numbers
the numbers are : 1221,2332,3445
Answers
Answer:
public class Test
{
void myMethod( )
{
int num1, num2, num3, sum ;
num1 = 1221 ;
num2 = 2332 ;
num3 = 3445 ;
sum = num1 + num2 + num3 ;
System.out.println(" 3 given numbers are: ");
System.out.println( num1 ) ;
System.out.println( num2 ) ;
System.out.println( num3 ) ;
System.out.println( " Sum = " + sum ) ;
}
}
Output:
3 given numbers are:
1221
2332
3445
Sum = 6998
Java:
Java is a popular third-generation programming language, which can be used to do any of the thousands of things that a computer software can do. With the features it offers, Java has become the language of choice for internet and intranet applications. Java plays an important role for the proper functioning of many software-based devices attached to the network.