Computer Science, asked by pratisthashinchan, 8 months ago

write a java program to find sum of three digit numbers​

Answers

Answered by prabirsarkar1464
7

Answer:

task01. task0132.

public class Solution {

public static void main(String[]

System. out. println(sumDigitsInNumber.

public static int sumDigitsInNumber.

int a = 5;

int b = 4;

int c = 6;

Explanation:

I hope it is helping u

so follow me

give me thanks

and don't forget to mark me as a brainlist.

thank you

Answered by vishal4053
1

Answer:

your answer ☺️

Explanation:

package com.codegym.task.task01.task0132;

/*

Sum of the digits of a three-digit number

*/

public class Solution {

public static void main(String[] args) {

System.out.println(sumDigitsInNumber(546));

}

public static int sumDigitsInNumber(int number) {

int a = 5;

int b = 4;

int c = 6;

int d = number%10;

int e = d + number;

return number / 10;

Similar questions