Computer Science, asked by MasterQuestioner, 11 months ago

Write a program to initialize
three int variables a, b and c with 234, 456 and 712
and store the sum of the last digits of the variables
into d and display it.

Class 9 - Computer Applications - Ch 3

Answers

Answered by duragpalsingh
28

Hey there!

Program to initialize  three int variables a, b and c with 234, 456 and 712 and store the sum of the last digits of the variables  into d and display it.

public  class Question

{     static void main()    

 {         int a=234, b=456, c=712, d;

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

   System.out.println("Sum of last digits="+d);

   } }

Hope It Helps You!

Answered by Anonymous
11

hola there

good question

check the answer in the pic

Attachments:
Similar questions