Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package activities;
- public class AreaOfTriangle
- {
- public static void main(String[] args)
- {
- double area, s, s1, s2, s3;
- s1 = 3;
- s2 = 4;
- s3 = 5;
- s = (s1+s2+s3)/2;
- area = Math.sqrt(s*(s-s2)*(s-s2)*(s-s3));
- System.out.println(area);
- //----------------------------------------------------------------
- double v,a,b,c, r = 10;
- v = 4.0/3*Math.PI*Math.pow(r,3);
- System.out.println(v);
- //----------------------------------------------------------------
- double a, vi, vf, t;
- vf = 4;
- vi = 0;
- t = 1;
- a = (vf-vi)/t;
- System.out.println("acceleration: "+ a);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement