Computer Science, asked by rugvedkulkarni2017el, 11 months ago

Write a program to find the last digit of given number;

Refer Sample input and Sample output for formatting.

Sample Input - 1:

546

Sample Output - 1:

6

Sample Input - 2:

12345

Sample Output - 2:

5

Answers

Answered by randhirsinghrana13
4

Answer:

Input : 12345

Output : First digit: 1

last digit : 5

Input : 98562

Output : First digit: 9

last digit : 2

Explanation:

PLEASE MARK ME AS BRAINLIST

Answered by poojamnagali12
7

Answer:

#include<iostream>

int main()

{

int num;

std::cin>>num;

std::cout<<num%10;

}

Explanation:

Similar questions