problem

I'm creating a small program:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <stdio.h>
#include <conio.h>
#include <string.h>

main()
{

int letters,date,size, age;
char name[40];


clrscr() ;
printf("Labas,koks jusu vardas?\n");
scanf("%s",name);
printf("%s,kelintais metais jus gimet?\n",name);
scanf("%d",date);
size = sizeof(name);
letters = strlen(name);
age=2008-date;
printf("Puiku , %s, Jums %d metai.\n", name, age );
printf("beto jusu vardas sudarytas is %d simboliu,\n" , letters);
printf("ir jis kompiuterio atminty uzima %d baitu.\n", size);
getch();
return 0;

}

at this part age=2008-date; , when I enter year of birth in the date place , it should deduct from 2008 , but it doesn't , maybe you'll know whats the problem.
Line 5: int main()
Line 14: scanf("%39s",name);
Line 16: scanf("%d",&date);

Enjoy!
Thanks , it works !
Topic archived. No new replies allowed.