nid.c

NID No
 avatar
arnobmahmud
c_cpp
2 years ago
798 B
1
Indexable
Never
#include <stdio.h>
#include <math.h>

int main(int argc, char const *argv[])
{

    long long int nid;
    printf("enter NID number: ");
    scanf("%lld", &nid);

    long long int temp = nid / pow(10,10);
    long long int ans = temp % 10;

    printf("%ld\n", ans);

    switch (ans)
    {
    case 1:
        printf("Rural area\n");
        break;

    case 2:
        printf("Paurashabha\n");
        break;

    case 3:
        printf("Other urban area\n");
        break;

    case 4:
        printf("Other adjacent area\n");
        break;

    case 5:
        printf("Cantonment area\n");
        break;

    case 9:
        printf("City corporation\n");
        break;
    default:
        printf("No area code in RMO\n");
        break;
    }
}