WAP IN JAVA to input two numbers and calculate the square of the digit at units place
Answers
Answered by
0
Answer:
class cal
{
public static void main(int a, int B)
{
int c= a/ 10; // it takes out the digit at units place
int d = b/ 10;
int sq1= c*c;
int sq2 = d*d;
System.out.println (c, d );
}
}
Similar questions