Pls give ans. I will mark it as brainliest, @aryamohan
Attachments:
Moo1:
can we write a java program
Answers
Answered by
1
public class Digits{
public void calculate (int n){
int s= 0;
int d= 0;
while(n!=0){
d= n%10;
s= s+d*d;
n= n/10;
}
System.out.println("The sum of squares of digits is " + s);
}
}
###HOPE THIS HELPS
###MARK AS THE BRAINLIEST PLEASE
public void calculate (int n){
int s= 0;
int d= 0;
while(n!=0){
d= n%10;
s= s+d*d;
n= n/10;
}
System.out.println("The sum of squares of digits is " + s);
}
}
###HOPE THIS HELPS
###MARK AS THE BRAINLIEST PLEASE
public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application
Command exited with non-zero status 1
Similar questions