Samiul_Islam_Abir

02

Jul 5th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.23 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int n,num;
  5.     printf("Enter any number:");
  6.     scanf("%d",&n);
  7.     while(n!=0)
  8.     {
  9.         num=n%10;
  10.         n=n/10;
  11.     }
  12.     printf("First natural number is= %d",num);
  13.     return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment