write a java program to find sum of three digit numbers
Answers
Answered by
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
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
Computer Science,
4 months ago
Environmental Sciences,
4 months ago
Math,
4 months ago
English,
8 months ago
Science,
1 year ago