Computer Science, asked by mdnahidalam874, 9 months ago

write a program to java
input a number and find the last digit of the number ​

Answers

Answered by vazotic
0

Answer:

program to Java -ysdydysustigig

input number -47473657

I hope It is useful. ; )

Answered by Harshitkalkhanda
1

Answer:

// Find the last digit

public static int lastDigit(int n)

{

// return the last digit

return (n % 10);

}

// driver function

public static void main(String argc[])

{

int n = 98562;

System.out.println(firstDigit(n) + " "

+ lastDigit(n));

}

}

Hope it will help you

Thanks the answer pls

Similar questions