Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package lab;
- import java.util.Scanner;
- class AddDistance{
- int a,b,c,d,sum,e,in,fe;
- void sum( )
- {
- Scanner input=new Scanner(System.in);
- a=input.nextInt();
- b=input.nextInt();
- c=input.nextInt();
- d=input.nextInt();
- in=a+c;
- fe=b+d;
- if(fe>11){
- in++;
- e=fe-11;
- }
- else e=fe;
- System.out.println("Ans: "+in+"fe "+e+"In ");
- }
- }
- public class objdis {
- public static void main(String[] args) {
- AddDistance inf=new AddDistance();
- inf.sum();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement