-
-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathBattingAverage.java
More file actions
15 lines (13 loc) · 511 Bytes
/
BattingAverage.java
File metadata and controls
15 lines (13 loc) · 511 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package com.dsa;
import java.util.Scanner;
public class BattingAverage {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("Enter the number of runs scored by the batter");
int runs=input.nextInt();
System.out.println("Enter the number of times the batter got out ");
int out= input.nextInt();
int batting_avg=runs/out;
System.out.println("The batting average of the batter is "+batting_avg);
}
}