Computer Science, asked by viyagulajenifer, 1 month ago

write a Java program to find the sum of a digits of a number using object with constructor​

Answers

Answered by parthwankhede21
0

Answer:

import java.util.Scanner;

public class SumOfDigitsExample1.

{

public static void main(String args[])

{

int number, digit, sum = 0;

Scanner sc = new Scanner(System.in);

System.out.print("Enter the number: ");

Similar questions