Computer Science, asked by sriyan44, 11 months ago

WAP in java to enter 4 digit nos. and print its 1st and last nos.​

Answers

Answered by bhardwajpratyaksha
4

Answer:

Explanation:

class number

{

public static void main ( String arg [ ] )

{

int n , d ;

n = 5555 ;

d = n % 10 ;

System.out.println( d + " is last digit " ) ;

n = n/100;

d = n%10;

System. out.println ( d + " is first digit ");

}

}

Similar questions