Skip to content

Commit 5bf3948

Browse files
author
codehouseindia
authored
Merge pull request codehouseindia#82 from virexh/patch-2
addition and average of numbers
2 parents 87b4dee + 4aa5945 commit 5bf3948

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

average.class

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#https://in.pinterest.com/pin/747808713120875493/
2+
#Subscribed by codehouseindia
3+
import java.util.Scanner;
4+
public class addition {
5+
public static void main(String[] args) {
6+
int a,b,c,ans,avg;
7+
System.out.println("Author name=Viresh Solanki");
8+
Scanner s=new Scanner(System.in);
9+
System.out.println("enter a=");
10+
a=s.nextInt();
11+
System.out.println("enter b=");
12+
b=s.nextInt();
13+
System.out.println("enter c=");
14+
c=s.nextInt();
15+
ans=a+b+c;
16+
System.out.println("answer="+ans);
17+
avg=(ans/3)*100;
18+
System.out.println("average="+avg);
19+
}
20+
}

0 commit comments

Comments
 (0)