Anyone pls tell Q8--->
Attachments:
Answers
Answered by
0
import java.util.*;
public class number
{
public static void main(String args[])
{
Scanner in = new Scanner(System.in);
int n,i,d=0,l,s,n1,m;
System.out.println("Enter a number = ");
n=in.nextInt();
for(i=n;i!=0;i=i/10)
{
d++;
}
l=n/(int)(Math.pow(10,(d-1)));
s=n%10;
m=(n%(int)(Math.pow(10,(d-1))))-s;
n1 = s*(int)(Math.pow(10,(d-1)))+m+l;
System.out.println("new number = "+n1+"\ntotal digit = "+d);
}
}
please mark it as brainliest...
^_^
Similar questions