1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
DerKrebs [107]
3 years ago
14

Write a program that asks the user to enter a birth year. the program should then indicate which generation a person of that yea

r belongs to. g
Computers and Technology
1 answer:
USPshnik [31]3 years ago
7 0
Something like the following. Also you need to give what language you are using. Anyways, you should be able to convert this to your language of choice. 

<script type="text/javascript">
function checkGeneration() { 
   var gen = ["Baby Boomer ","Generation X","Xennials","Generation Y"];
   var reversestr = "";
   var getyear = window.prompt("Enter a 3 digit number: ");
    if (parseInt(getyear) <= 1964) {
        alert(gen[0]);   
    } else if(parseInt(getyear) <= 1979) {
        alert(gen[1]);
    } else if(parseInt(getyear) <= 1985) {
        alert(gen[2]);               
   }  else if(parseInt(getyear) <= 1995) {
        alert(gen[3]);
   }
 }
checkGeneration();
</script>
You might be interested in
In the Microsoft publisher application, words underlined in red are ____.
nydimaria [60]

In the Microsoft publisher application (as well as many other websites such as Brainly, Google docs, etc), words underlined in red are spelled incorrectly.

Whether you spelled it incorrectly or did not complete the words, as long as the word is not found in the dictionary, the word would be underlined with a red squiggly line.

~

4 0
3 years ago
Magbigay ng tatlong hanap buhay na makukuha sa mineral produktong galing sa dagat at produktong agrikultural
OLEGan [10]
..............................................nice !
7 0
3 years ago
Read 2 more answers
To celebrate earth day, the employees of a company plan to reduce their carbon footprint in the workplace. Identify the changes
andrew11 [14]
<span>Go paperless. 
Use natural lighting. 
Grow trees nearby. 
Reduce, reuse, and recycle. 
Carpool. 
</span>
5 0
3 years ago
Read 2 more answers
What should you change if you want one particular slide to have a different arrangement of text box placeholders?
Ganezh [65]
<span>slide layout you should change the slide layout hope this helps  ................</span>
8 0
3 years ago
How can artificial intelligence be used in learning science?
tiny-mole [99]

Artificial intelligence can be used to help science students research and verify their research. It is also a very interesting topic to study in general.

Hope that helped!!! k

5 0
3 years ago
Other questions:
  • In this assignment, you are going to add conditional formatting to the spreadsheet you used in the previous
    13·1 answer
  • Among the web programming languages, css is used to define _____ of the web page
    5·1 answer
  • What is processor, memory RAM, cDRAM,DVD RAM,video card​
    9·1 answer
  • Try making a character (string) variable and a logical variable . Try creating a variable with a "missing" value NA. You can cal
    11·1 answer
  • Stating a document is PDF or XPS document refers to document _______​
    10·1 answer
  • 1.What is the term referring to an amount of money that is owed?
    6·2 answers
  • Detecta 1 problema
    5·2 answers
  • What is the index of 7 in this list?
    10·1 answer
  • The causes of making computer virus​
    12·2 answers
  • Heya!!<br><br>•DEFINE DATA SCIENCE??<br>(∩_∩)<br><br>#kavya#<br>​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!