Created
September 9, 2014 04:03
-
-
Save raydvard/0c7cd38c45e6ef4f01e7 to your computer and use it in GitHub Desktop.
C++ Practice kortesi :)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//###################### Prac-1 ########################## // | |
// Input an integer number and output the last digit of the given number // | |
// ####################################################### // | |
#include <stdio.h> | |
int main() | |
{ | |
int num, ld; | |
printf("Please input an integer number: "); | |
scanf("%d", &num); | |
ld = num % 10; // Logic to output last digit of any integer number is to find out the reminder !! | |
printf("\nThe last digit of the given number is: %d", ld); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment