write a program in java to calculate the sum of five decimal numbers
Answers
Answered by
2
Answer:
- public static void main(String[] args)
- int num1 =1.1;
- int num2 =2.2;
- int num3 =3.3;
- int num4 =4.4;
- int num5 =5.5;
- sum =num1+num2+num3+num4+num5;
- System.out.println("five decimal numbers is: "+sum);
Answered by
0
Answer:
Explanation:
CLS
INPUT "ENTER THE FIRST DECIMAL NO";A
INPUT "ENTER THE SECOND DECIMAL NO";B
INPUT "ENTER THE THIRD DECIMAL NO";C
INPUT "ENTER THE FOURTH DECIMAL NO";D
INPUT "ENTER THE FIFTH DECIMAL NO";E
S=A+B+C+D+E
PRINT "THE SUM OF FIVE DECIMAL NUMBERS IS";S
Explanation:
HOPE IT HELPS
Similar questions