#include
#include
int main (void)
{
int a,b,c,d,e,f,g,h,i,t,y,r,s,p,q,l,k;
printf("tc kimlik numaranizin ilk 9 hanesini teker teker giriniz...\n");
printf("1. rakami giriniz...=");scanf("%d",&a);
printf("2. rakami giriniz...=");scanf("%d",&b);
printf("3. rakami giriniz...=");scanf("%d",&c);
printf("4. rakami giriniz...=");scanf("%d",&d);
printf("5. rakami giriniz...=");scanf("%d",&e);
printf("6. rakami giriniz...=");scanf("%d",&f);
printf("7. rakami giriniz...=");scanf("%d",&g);
printf("8. rakami giriniz...=");scanf("%d",&h);
printf("9. rakami giriniz...=");scanf("%d",&i);
t=(a+c+e+g+i)*7;
y=t%10;
r=(b+d+f+h)*9;
s=r%10;
p=y+s;
q=p%10;
l=a+b+c+d+e+f+g+h+i+q;
k=l%10;
printf("tc kimlik numaranizin tamami=");
printf("%d",a);
printf("%d",b);
printf("%d",c);
printf("%d",d);
printf("%d",e);
printf("%d",f);
printf("%d",g);
printf("%d",h);
printf("%d",i);
printf("%d",q);
printf("%d",k);
getch();
return(0);}
c++ karşılığı
#include
using namespace std;
int a,b,c,d,e,f,g,h,i,t,y,r,s,p,q,l,k;
main(){
cout<<"T.C. kimlik numaranizin ilk 9 hanesini teker teker giriniz...\n";
cout<<"1. rakami giriniz...=";
cin>>a;
cout<<"2. rakami giriniz...=";
cin>>b;
cout<<"3. rakami giriniz...=";
cin>>c;
cout<<"4. rakami giriniz...=";
cin>>d;
cout<<"5. rakami giriniz...=";
cin>>e;
cout<<"6. rakami giriniz...=";
cin>>f;
cout<<"7. rakami giriniz...=";
cin>>g;
cout<<"8. rakami giriniz...=";
cin>>h;
cout<<"9. rakami giriniz...=";
cin>>i;
t=(a+c+e+g+i)*7;
y=t%10;
r=(b+d+f+h)*9;
s=r%10;
p=y+s;
q=p%10;
l=a+b+c+d+e+f+g+h+i+q;
k=l%10;
cout<<"T.C. kimlik numaranizin tamami=";
cout<<""<}