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
How can a search be narrowed to only search a particular website????
vesna_86 [32]

Answer:

There are a variety of ways to narrow down your search results in a library database. The two most direct ways are to focus your search with more specific keywords and/or to limit by various criteria before or after searching. The more specific you are with your search terms, the more relevant your results will be

Hope it helped!!!

4 0
3 years ago
Ayúdenme con estas preguntas son para mañana porfis!!!
kogti [31]

Answer:

i can't understand your language

8 0
3 years ago
What are the different components of the cloud architecture?
USPshnik [31]
To combine these components make up computing architecture.
8 0
3 years ago
Read 2 more answers
The worlds two highest dams are both in tajikistan. the rogun dam is 35 meters taller than the nurek dam. together they are 635
Hitman42 [59]
The nurek dam is 300 meters tall.
300 + 335 = 635
5 0
3 years ago
What is the difference between a manufacturing engineer and a materials engineer?
lyudmila [28]
<span> a </span>manufacturing<span> or industrial </span>engineer<span> are mechanical </span>engineers<span> with ... Process </span>Engineers<span> specialise in processes where raw </span>materials<span> are converted using chemical processes resulting in significantly </span>different<span> ...</span>
7 0
3 years ago
Read 2 more answers
Other questions:
  • What event in the 1970s contributed to the current
    6·2 answers
  • The init() command initializes the task queue and scheduler data structures. run Next Task() MUST run to completion whatever tas
    9·1 answer
  • Your company is instituting a new security awareness program. You are responsible for educating end users on a variety of threat
    10·1 answer
  • Which one of these do not belong on the Do's list in Helpful Hints when preparing a presentation: Which one of these do not belo
    8·1 answer
  • Which of the following attributes of a website indicates a more reliable source for information?
    8·1 answer
  • Suppose that a is declared as an int a[99]. Give the contents of the array after the following two statements are executed: for
    15·1 answer
  • Differentiate between trusted-source-security and antispoofing-security techniques.
    10·1 answer
  • Why can't this app have people ask riddles.
    8·1 answer
  • Write a one page report describing the computer the client used, who else had access to it and other relevant findings. Referenc
    7·1 answer
  • What are five types of applications you can create in Visual Basic 2017?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!