Java Programming

  1. Java Program: to find average of two numbers
    
    public class Average {
      public static void main(String[] args) {
     
      double num1 = 10;
      double num2 = 20;
                    
      double sum = 0.0;
      double avg = 0.0;
                
      sum = num1 + num2;
      avg = sum/2;       
      System.out.println("Average: " + avg );
                      }
                    } 
  2. Output:
    
     Average: 15.0
                  

Others Programming Language

article

programming C

Muktarul Hossain
article

C++

Muktarul Hossain
article

Python

Muktarul Hossain
article

Website Design

Muktarul Hossain