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]
2 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]2 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
What is the difference between second generation and third generation of computer​
Alexeev081 [22]

Answer:

The main difference between second generation (2G) and third generation (3G) technology is data. 2G services were developed with mostly voice services in mind, but are capable of providing relatively slow (14.4kbps) speed data services.

8 0
2 years ago
C++ a. Write a program that uses the function isPalindrome given in example 6-6 (Palindrome). Test your program on the followinn
Whitepunk [10]

Answer:

#include <iostream>

#include <array>

using namespace std;

bool isPalindrome(string str)  

{  

int length = str.length();  

for (int i = 0; i < length / 2; i++)  

 if (toupper(str[i]) != toupper(str[length - 1 - i]))

  return false;  

return true;  

}

int main()

{

array<string, 6> tests = { "madam", "abba", "22", "67876", "444244", "trymEuemYRT" };

for (auto test : tests) {

 cout << test << " is " << (isPalindrome(test) ? "" : "NOT ") << "a palindrome.\n";

}

}

Explanation:

The toupper() addition forces characters to uppercase, thereby making the comparison case insensitive.

5 0
3 years ago
Susan is working with an IT company. She has been asked to make sure that all of the functions in the company are in place and p
MrMuchimi

According to Henri Fayol, it can be said that there are five functions of management: planning, organizing, staffing, directing, and controlling. From the description in the question, it seems that Susan should employ the controlling management function – which is defined as ensuring that all the ongoing process are proceeding as planned.

It is clear that this definition is precisely what Susan needs to do to fulfill the request that she was given.

7 0
3 years ago
Describe a sub routine​
Maksim231197 [3]

Explanation:

A routine or subroutine, also referred to as a function procedure and sub program is code called and executed anywhere in a program. FOr example a routine may be used to save a file or display the time.

4 0
2 years ago
In most operating systems what is running application called?
Likurg_2 [28]

Answer:

I believe it is just a task. Since there exists(on windows) the Task Manager application, where you can stop any running <em>task, </em>I think that they are called tasks

Explanation:

5 0
2 years ago
Other questions:
  • Explain the steps users can take to maintain an operating system
    15·1 answer
  • What is the process of copying items from ram to a storage device?
    8·1 answer
  • Consider a situation where we have a file shared between many people.  If one of the people tries editing the file, no other pe
    6·1 answer
  • Select the term below which is a protocol that provides a method for software components to communicate, interact, and share dat
    6·1 answer
  • User can use ______ commands to search for and correct words in a document
    13·1 answer
  • The term generally used to describe storage systems that function at high speeds is:
    12·1 answer
  • Which of the following types of computers is typically used by governments and hospitals and can support hundreds of users?
    6·2 answers
  • Based on the code you created in this Unit, propose a way to re-use most of the code (with different information in the variable
    14·1 answer
  • The price of an item you want to buy is given in dollars and cents. You pay for it in cash by giving the clerk d dollars and c c
    6·1 answer
  • Which requires large computer memory?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!