Computer Science, asked by MasterQuestioner, 11 months ago

Write a program to input three integers and find the sum of the last digit of the numbers. For example, if the inputs are: 12 26 35
Output: Sum of the last digit of the integers are: 13

Class 9 - Computer Applications - Ch 5 - Input in JAVA

Answers

Answered by duragpalsingh
73

Hey there!

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

import java.util.*;  

public class Question10

{    

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);  

  }

}

Hope It helps You!

Answered by Anonymous
27

hola mate

here is ur answer

hope this helps.

❤❤❤❤❤.

Attachments:
Similar questions