Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- 6. Find the Tail
- Letโs play a game! Iโm going to give you a 3-digit number and youโre going to tell me which is its tail. The tail is the last digit of the number. Ready? Go!
- Inputs
- 1. A 3-digit number
- */
- #include <stdio.h>
- int main(){
- int num,s1;
- printf("Enter the number: ");
- scanf("%d",&num); //decimal so based 10
- //if binary = base 2
- s1 = num % 10;
- printf("%d",s1);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement