0
what code can be used to automatically change the year of birth every year?
каким кодом можно каждый год изменить автоматически год рождения?
11 ответов
+ 5
Zip code
+ 4
Wouldn't the year of birth stay the same and only the age changes?
You could set the value by querying the current date and compare it to the year of birth.
Please tag the relevant programming language.
+ 2
Every language can do it. We just have to run the code to update (though in a real world application we would probably keep all the students' data in a database)
+ 2
The actual code depends on the programming language. By "running the code" I mean "executing the code"
+ 2
You have to write it. Which programming language?
+ 1
I will say now for example: a student is studying in the first year next year he must become the 2nd year .... the question is in what language can you do this so that the automatic system does it for the 2nd year?
+ 1
* store the year when the student started
* fetch the current date
* compare the current year to the starting year
* the current grade then is 1 + difference of current year and starting year
+ 1
Thank you!
0
What is code?
0
where can I find the code?
0
JS