Computer Science, asked by pratimakumari282006, 4 months ago

write a program to input three integers and find the sum of the last digits of the number​

Answers

Answered by kunalhedaoo25
1

Answer:

Program to input three integers and find the sum of the last digit of the numbers.

import java.util.*;  

public class Question

{    

static void main()

   {          

Scanner sc=new Scanner(System.in);  

      int a,b,c,s;        

System.out.println("Enter three integers:");  

     a=sc.nextInt();          

b=sc.nextInt();      

c=sc.nextInt();    

   s=a%10+b%10+c%10;    

    System.out.println("Sum of the last digit of the integers

are:"+s);  

 }

}

Similar questions