Skip to content

Instantly share code, notes, and snippets.

@echo-akash
Created August 10, 2017 17:25
Show Gist options
  • Save echo-akash/b60d8f9cb47be6f6e76df9c7757fda46 to your computer and use it in GitHub Desktop.
Save echo-akash/b60d8f9cb47be6f6e76df9c7757fda46 to your computer and use it in GitHub Desktop.
Print the unit and tenth place value of a number.
#include<stdio.h>
int main()
{
int n;
printf("enter the number:");
scanf("%d",&n);
printf("unit place:%d",n%10);
printf("\nten's place:%d",(n/10)%10);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment