Monday, 30 October 2017

Introduction to Java program



Problem 1.5
                                 Write a program that displays the result of
             (9.5 * 4.5 - 2.5 * 3)/(45.5 - 3.5);
Discription:
                    By writing this value in S.O.P(); display the result
Solution:
                   public class Message {

    public static void main(String[] args) {
         
             System.out.println("The result is "+(9.5 * 4.5 - 2.5 * 3)/(45.5 - 3.5));
    }
   
}

Output:  
        


No comments:

Post a Comment