Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Homework1 {
- public static void main(String[] args){
- int x=2;
- int y=3;
- int z=23;
- int a= Math.abs(a=400);
- int b=Math.abs(b=-200);
- int c= Math.abs(c=-40);
- int d=Math.abs(d=1200);
- int m= 1234;
- System.out.println(f(x,y));
- System.out.println(g(z)+ " " + k(z));
- System.out.println(Math.abs(l(a,b,c,d)));
- }
- public static long f(int x, int y){
- return x+y;
- }
- public static long g(int z){
- return z/10;
- }
- public static long k(int z){
- return z%10;
- }
- public static long l( int a, int b, int c, int d){
- return Math.abs(a+ b + c - d);
- }
- public static long v (int m){
- return m/1000;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement