Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2018
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1.  
  2. package com.company;
  3.  
  4. import java.util.Scanner;
  5.  
  6. public class Main {
  7.  
  8.     public static void main(String[] args) {
  9.  
  10.         int M;
  11.         int S;
  12.         int A;
  13.         int K =0;
  14.         int G=0;
  15.         int Y=0;
  16.         int Sym=0;
  17.         int F =0;
  18.         int O=0;
  19.         int H=0;
  20.         int L =0;
  21.  
  22.  
  23.         Scanner in =new Scanner(System.in);
  24.         M=in.nextInt();
  25.         S=in.nextInt();
  26.         A=in.nextInt();
  27.         K = M%10;
  28.         G=S%10;
  29.         Y=A%10;
  30.         Sym= K+G+Y;
  31.         System.out.println(Sym);
  32.         H =M/10;
  33.         O=S/10;
  34.         F=A/10;
  35.         L=H+O+F;
  36.  
  37.         System.out.println(L);
  38.  
  39.  
  40.  
  41.        
  42.     }
  43.  
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement