WAP in java to enter 4 digit nos. and print its 1st and last nos.
Answers
Answered by
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
Math,
6 months ago
English,
6 months ago
Science,
11 months ago
Environmental Sciences,
1 year ago
History,
1 year ago