Computer Science, asked by jerefreddy, 3 months ago


Write program to accept an integer. Print first and last digit of number and their product using Java.

Answers

Answered by AnjanaUmmareddy
1

Answer:

Procedure to find the sum of first and last digit of a number in java,

1.take a number.

2. declare sum variable and initialize it with 0.

3. find the last digit. to find the last digit we can use % operator. ...

4 .find the first digit of the number. for this. ...

5. add first and the last digit to the sum variable.

Answered by bhuvanasrigk06
1

Answer:

procedure to find the sum of first and last digit of a number in java,

  • take a number.
  • declare sum variable and intialize it with 0.
  • find the last digit. to find the last digit we can use % operator.
  • find the first digit of the number. good this.
  • add first and last digit to the sum variable.

Similar questions