Explain the naming rules for creating variables, and then provide three examples using the data types int, double, and char and assign values to them.

Answers

Answer 1

Answer:

I will answer for Javascript language.

Naming rules for creating variables:

The first character must begin with:

Letter of the alphabet. Underscore ( _ ) (not recommended). The dollar sign ($). (not recommended).  

After the first character:

Letters. Digits 0 to 9.  No spaces or special characters are allowed.  

About length:

No limit of length but is not recommended to use large names.

About case-sensitive:

Uppercase letters are distinct from lowercase.  

About reserved words:

You can't use a Javascript reserved word for a name.

Example:

var ten = 10;

var pi = 3.14;

var name = 'Josh';


Related Questions

Explain the ‘PDCA’ for quality assurance.

Answers

Answer: PDCA is the known as plan-do-check-act is the cyclic technique in which the methods of planning , doing ,checking and acting upon it is carried out in the business management field.This approach is used for achieving solution to any particular problem.

It measures the improvement, updating methods of working and process of the business management. PDCA also eliminates the mistakes and error that reoccur.These factors evaluates about the quality of the business management process and hence quality is assured.

What types of tools are used in the process of a digital or network investigation?

Answers

Answer and Explanation:

The tools that are used in the network investigation process by the forensic departments in order to get better results while dealing with cyber crimes:

Some of the analysis tools are:

Tools for file analysisTools for Internet AnalysisEmail and Registry Analysis toolsDatabase and Network Forensic toolstools for analysis of mobile devices.File viewersTools  for mac Operating system analysis.Tools to capture datafirewallsEncryption of network

Like in encryption of the data is encoded by cryptographic codes at the transmitting end and then decoded at the receiving end securely.

Which component in a desktop PC converts electricity from AC to DC?
-SSD
-CPU
-PCIe Slot
-Power Supply

Answers

Answer:

Power Supply

Explanation:

A power supply unit in a Desktop PC converts AC power from the mains to low-voltage DC power needed by the computer. The power supply, commonly referred to as the PSU, is the metal box usually found in the corner of the case connected to the power through a cord. The PSU uses the switcher technology to convert AC input to DC. The typical voltages used are 3.3, 5, and 12 volts.

Answer: power supply

When passing data values between different machines with different operating systems what problems have to be solved?

Answers

Final answer:

When passing data values between different machines with different operating systems, several problems need to be solved, including file compatibility, encoding and character sets, and network connectivity.

Explanation:

When passing data values between different machines with different operating systems, there are several problems that need to be solved:

File Compatibility: Different operating systems may have different file formats and structures, making it difficult to open and read files created on one system on another system. For example, a file saved in a specific format on a Windows machine may not be compatible with a Mac machine.

Encoding and Character Sets: Different operating systems may use different encoding and character sets, which can lead to garbled or incorrect data when transferring files. For example, a file containing special characters in one encoding system may not be correctly interpreted by another system.

Network Connectivity: Transferring data between machines with different operating systems may require establishing compatible network connections and protocols. This can involve configuring firewalls, setting up appropriate network protocols, and ensuring both machines can communicate effectively.

To address these problems, various software and tools are available that enable file conversion, encoding conversion, and network compatibility. Additionally, establishing good communication channels and protocols between machines is essential for successful data transfer.

__________ systems support the search for and sharing of organizational expertise, decision making, and collaboration at the organization level regardless of location.
a. KM
b. ERP
c. CRM
d. SCM

Answers

Answer:b) ERP

Explanation: ERP(Enterprise resource planning) is the strategical formal planning process which is regarding the business process management .ERP provides services form the improving productivity ,delivery, efficiency with the use of integrated application, software and technology.

Other options are incorrect because CRM (Customer relationship management) works in maintaining relation between the organisation and the customer, SCM(Supply chain management) is the business process for management of the execution, planning and flow of the business .

KM(Knowledge management) is for the maintenance of data/information.Therefore, the correct option is option(b)

KM systems are designed to support the search and sharing of organizational knowledge, enhancing decision-making and collaboration across an organization. Unlike ERP, CRM, and SCM systems, KM systems are focused on managing knowledge assets.

The systems that support search for and sharing of organizational expertise, decision making, and collaboration at the organization level regardless of location are known as KM systems (Knowledge Management systems). These systems allow for the effective management and sharing of an organization's knowledge assets, including documents, policies, procedures, and expertise held by individual employees.

Knowledge Management systems facilitate collaboration among team members, enhance decision-making processes, and play a crucial role in ensuring that the right information is available to the right people at the right time. Contrary to ERP (Enterprise Resource Planning), CRM (Customer Relationship Management), and SCM (Supply Chain Management) systems, which have more specialized focuses, KM systems are dedicated to capturing and distributing knowledge across the enterprise.

What is ‘Software Testing’?

Answers

Answer: Software testing can be referred as an as activity that one execute in order to verify whether the results match expected results and also to make sure that software system is without any defect. It also tends to involve execution of few software component in order to evaluate several properties.  This majorly helps to identify gaps, error or requirements that are missing in respect to actual requirements.

What year was MCTC founded ? right answer 1996

Answers

Answer:

Minneapolis Community and Technical College was formed in February 1996

Explanation:

MCTC

Minneapolis Community and Technical College was formed in February 1996

this was Minneapolis Community and Technical College following by  july 1955 latter it was merger and become MCTC in 1966

and  

Chancellor of MCTC is Devinder Malhotra

and President is Sharon Pierce

it is situated at Minneapolis, Minnesota in  United States of America

Minneapolis Community and Technical College (MCTC) was founded in 1996. It was established to provide educational services to the community.

Founding Year of MCTC

MCTC, short for Minneapolis Community and Technical College, was founded in 1996. This college was established to serve the educational needs of the community, offering a wide range of associate degrees and certification programs. Since its inception, MCTC has grown significantly and continues to play a crucial role in higher education.

The data field in an ethernet frame contains between 46 and _______ bytes of information.

Answers

Answer: 1500 bytes

Explanation:

 In the ethernet frame, the data field basically contain 46 to 1500 bytes of information.  

The ethernet frame begins with the header, that basically contains MAC addresses source and its destination in the network, along with some other information. The center part of the given frame contain genuine information. The edge of the frame closes with the field known as Frame Check Sequence (FCS).

The tag information or data is also being added for creating the particular data field of the MAC client.  

What is the purpose of a filename extension? How can you restore a file that you deleted from the hard disk?

Answers

Answer:

The main purpose of the file name extension is that in the operating system it basically helpful for knowing the actual name of the file which we want to open in the system. The file name extension is also known as file suffix and file extension.

The file name extension are the character and gathering of the given characters after some time period that making the whole name of the record in the file system.

It basically enables a working framework, such as Windows and mac operating system (OS), figure out which programming on our PC the document is related with the particular file.

We can easily restore our file from hard disk system by two main ways as follows:

We can easily recover our file from the computer backup. Checked your deleted file in the recycle bin and then restore it.

The jackpot of a lottery is paid in 20 annual installments. There is also a cash option, which pays the winner 65% of the jackpot instantly. In either case 30% of the winnings will be withheld for tax. Design a program to do the following. Ask the user to enter the jackpot amount. Calculate and display how much money the winner will receive annually before tax and after tax if annual installments is chosen. Also calculate and display how much money the winner will receive instantly before and after tax if cash option is chosen.

Answers

Answer:

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

int main()

{

// variables

   double jack_amount;

   int choice;

   double before_tax, after_tax;

   cout<<"Please enter the jackpot amount:";

// read the amount

   cin>>jack_amount;

   cout<<"enter Payment choice (1 for cash, 2 for installments): ";

// read the choice

   cin>>choice;

// if choice is cash then find the instant amount before and after tax

   if(choice==1)

   {

       before_tax=jack_amount*.65;

       after_tax=(jack_amount*.70)*.65;

       cout<<"instantly received amount before tax : "<<before_tax<<endl;

       cout<<"instantly received amount after tax : "<<after_tax<<endl;

   }

// if choice is installments then find the each installment before and after tax

   else if(choice==2)

   {

       before_tax=jack_amount/20;

       after_tax=(jack_amount*.70)/20;

       cout<<"installment amount before tax : "<<before_tax<<endl;

       cout<<"installment amount after tax : "<<after_tax<<endl;

   }

return 0;

}

Explanation:

Read the jackpot amount from user.Next read the choice of Payment from user.If user's choice is cash then calculate 65% instantly amount received by user before and after the 30% tax.Print both the amount.Similarly if user's choice is installments then find 20 installments before and after 30% tax.Print the amount before and after the tax.

Output:

Please enter the jackpot amount:120

enter Payment choice (1 for cash, 2 for installments): 1

instantly received amount before tax : 78

instantly received amount after tax : 54.6

Given the following data definition
Array: .word 3, 5, 7, 23, 12, 56, 21, 9, 55

The address of the last element in the array can be determined by:

Array

Array + 36

36 + Array

Array + 32

40 + Array

Answers

Answer:

Array + 36.

Explanation:

The array contains the address of the first element or the starting address.So to find the address of an element we to add the size*position to the starting address of the array.Which is stored in the variable or word in this case.

There are 9 elements in the array and the size of integer is 4 bytes.So to access the last element we have to write

array + 4*9

array+36

Dеclarе and allocatе mеmory (on thе hеap) for a two-dimеnsional array of strings namеd carMakеs with 20 rows, еach with 6 columns

Answers

Answer:

string ** carMakes=new string*[20];  

   for(int i=0;i<20;i++)

   {

       carMakes[i]=new string[6];

   }

Explanation:

The above written piece of code is in C++ and it will declare and allocate memory on the heap for a 2-D array of strings with the number of rows 20 and number of columns 6 with name of the array carMakes.

To declare a 2-D array in C++ we use new keyword.

Usually, the same software that is used to construct and populate the database, that is, the DBMS, is also used to present ____.

choices

entities

options

queries

Answers

Answer: Queries

Explanation: A database management system(DBMS) is a system that contains the data/information in the form of content or tables.There is a software that can populate the system by the excess data usually found in the SQL format

A query is the demand for the extraction of the information that is present in the database table or content.It helps in presenting extracted data in the readable data.The most commonly used language for the queries is the SQL (structured query language) queries.Thus, the correct option is queries.

Given these values for the boolean variables x,y, and z:

x=true; y=true; z=false;

Indicate whether each expression is true (T) or false (F):

1) ! (y || z) || x

2) z && x && y

3) ! y || (z || x)

4) x || x && z

Answers

Answer:

1. True.

2. False.

3. True.

4. True.

Explanation:

Remember OR operator (||) gives false when both of it's operands are false. AND Operator (&&) gives false when even one of it's operator is false.

In first part we have  

!(True || False) || True

=!True||True

=False||True

=True

In second part we have.

False && True && True

= False && True

=False.

In Third part

! True || (False || True)

=False || True

=True.

In fourth part

True || True && False

=True|| False

=True.

Sammy's Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrellas to tourists. Write a program that prompts the user for the number of minutes he rented a piece of sports equipment. Compute the rental cost as $40 per hour plus $1 per additional minute. (You might have surmised already that this rate has a logical flaw, but for now, calculate rates as described here. You can fix the problem after you read the chapter on decision making.) Display Sammy's motto with the border that you created in the SammysMotto2 class in Chapter 1. Then display the hours, minutes, and total price. Save the file as SammysRentalPrice.java.

Answers

Answer:

// here is code in java.

import java.util.*;

// class definition

class SammysRentalPrice

{

// main method of the class

public static void main(String[] args) {

    // scanner object to read input from user

    Scanner s=new Scanner(System.in);

      // ask user to enter year

       System.out.print("Enter the rented minutes:");

       // read minutes

      int min=s.nextInt();

      // find hpurs

      int hours=min/60;

      // rest  of minutes after the hours

      min=min%60;

      // total cost

      int tot_cost=(hours*40)+(min*1);

      // print hours,minute and total cost

      System.out.println("total hours is: "+hours);

      System.out.println("total minutes is: "+min);

      System.out.println("total cost is: "+tot_cost);

     

}

}

Explanation:

Read the rented minutes of an equipment from user with the help of scanner object. Calculate the hours and then minutes from the given minutes.Calculate the cost by multiply 40 with hours and minute with 1.Add both of them, this will be the total  cost.

Output:

Enter the rented minutes:140

total hours is: 2

total minutes is: 20

total cost is: 100

Final answer:

To write a program that calculates the rental cost for Sammy's Seashore Supplies, you can follow these steps: Prompt the user for the number of minutes the equipment was rented. Convert the minutes to hours by dividing by 60. Calculate the rental cost using the formula: total cost = (hours * $40) + (additional minutes * $1). Display Sammy's motto with the border. Display the hours, minutes, and total price using appropriate formatting.

Explanation:

To write a program that calculates the rental cost for Sammy's Seashore Supplies, you can follow these steps:

Prompt the user for the number of minutes the equipment was rented.Convert the minutes to hours by dividing by 60.Calculate the rental cost using the formula: total cost = (hours * $40) + (additional minutes * $1).Display Sammy's motto with the border.Display the hours, minutes, and total price using appropriate formatting.

Here is an example code snippet in Java:

import java.util.Scanner;

class SammysRentalPrice {
  public static void main(String[] args) {
      Scanner scanner = new Scanner(System.in);
      System.out.print("Enter the number of minutes rented: ");
      int minutes = scanner.nextInt();

      int hours = minutes / 60;
      int additionalMinutes = minutes % 60;
      double rentalCost = (hours * 40) + (additionalMinutes * 1);

      System.out.println("Sammy's motto with border");
      System.out.printf("Hours: %d%n", hours);
      System.out.printf("Minutes: %d%n", additionalMinutes);
      System.out.printf("Total price: $%.2f%n", rentalCost);
  }
}

Remember to replace the motto and the border with the actual display. Also, make sure to add error handling and input validation as needed.

Which of the following is NOT a MySQL table storage engine?
(a) Blackhole
(b) SuperNova
(c) MyISAM
(d) MRG_MyISAM
(e) InnoDB

Answers

Answer:

(b)Supernova.

Explanation:

MYSQL storage engines are software modules that are used by the database management systems to read,update,create from a database.

There are basically two types of storage engines Transactional and Non-Transactional.

Among the names engines provided all of them are MYSQL storage engines except supenova.

The technology which is not a MySQL table storage engine is: B. SuperNova

What is MySQL?

MySQL can be defined as open-source relational database management system (RDBMS) that was designed and developed by Oracle Corporation in 1995. Also, MySQL was developed based on structured query language (SQL).

In Computer technology, there are various storage engine that are designed and developed for use in MySQL table and these include the following:

BlackholeMyISAMMRG_MyISAMInnoDB

However, SuperNova is not a MySQL table storage engine.

Read more on MySQL here: https://brainly.com/question/24443096

Companies discourage their suppliers from joining their extranets.

True

False

Answers

Answer:

False

Explanation:

A controlled private network that can be used for information exchange by using internet technology and the telecom system of the public.

It allows the outside user with authentication to partially access the network for business information exchange securely.

Thus companies encourage the suppliers to use extranets to share information or operations related to a business so as not to lag behind in the technologically competitive era.

Companies actually encourage their suppliers to join their extranets as it can streamline communication, enhance collaboration, and improve efficiency in the supply chain. The statement is false.

Extranets are secure networks that extend internal company resources to external parties like suppliers, enabling shared access to information and data.

However, many companies may not actively encourage suppliers to join their extranets due to concerns over data security, privacy, and the complexity of managing external access.

Broker Ray is closely acquainted with the Subdivision Heights neighborhood of his town. Over the year, Ray has made it a practice to contact homeowners in person and also to send them quarterly mailings. This method of finding listings is known as:

Answers

No multiple choice?

In rolling a die four times, what is the odds that at least one 5 would appear?

Answers

Answer:

The probability that at least one 5 will appear in 4 rolls of die equals [tex]\frac{671}{1296}[/tex]

Explanation:

The given question can be solved by Bernoulli's trails which states that

If probablity of success of an event is 'p' then the probability that the event occurs at least once in 'n' successive trails equals

[tex]P(E)=1-(1-p)^{n}[/tex]

Since in our case the probability of getting 5 on roll of a die equals 1/6 thus we have p = 1/6

Applying the values in the given equation the probability of success in 4 rolls of die is thus given by

[tex]P(E)=1-(1-1/6)^{4}=\frac{671}{1296}[/tex]

[What is an ‘inspection’?

Answers

Answer:

 The inspection is the process where the trained people inspect or check the important documents and design thoroughly. The main function of the inspection is to check the proper quality of the document and design by the process analyzing, testing and examining.

Inspection basically provide various benefits as it increase the quality of the system by examine properly so that the document must be error free.

Inspection is required in all the workplace so it help to increase the productivity and efficiency of the organization.

The quicksort pivot value should be the key value of an actual data item; this item is called the pivot. True or False?

Answers

Answer:

True.

Explanation:

the pivot element in quick sort is the the value of an element present in the array that is present in the array.The pivot is the most important element in the quick sort because the time complexity of the quick sort depends upon the pivot element.

If the pivot selected in the array is always the highest or the lowest element then the time complexity of the quick sort becomes O(N²) other wise the average time complexity of quick sort is O(NlogN).

True/False: The cin object lets the user enter a string that contains embedded blanks.

Answers

Answer:

False

Explanation:

The cin object is used in a program in order to wait till the time we type the information on the keyboard and the time we press the enter key on the keyboard.

The header file 'iostream' is a must to be included to use this object.

The cin object does not let the user to enter the string with embedded gaps as it reads the input buffer till the gap or space and it stops when there is a blank.

By defeaut, Excel cells are top aligned

a. True

b. False

Answers

Answer: True

Explanation:

Yes, the given statement is true that the by default the excel cells are basically aligned at the top. We can easily change the alignment horizontally and vertically in the cell.

In the excel we can change the alignment by selecting the particular cell and then, click on the options to select the particular tab to change the alignment of the cell. By default, the excel cell are aligned at the top and and the text are align at the left by default.  

Write a program in C which asks the user for 10 integers and prints out the biggest one.

Answers

Answer:

Following are the program in c language

#include<stdio.h> // header file

int main() // main function

{

   int ar[10],k,biggest; // variable declaration

   printf("Enter the ten values:\n");

   for (k = 0;k < 10; k++)  

   {

      scanf("%d", &ar[k]); // user input of 10 number

   }

   biggest = ar[0]; // store the array index of 0 into biggest variable

   for (k = 0; k< 10; k++) // finding the biggest number  

   {

    if (ar[k] >biggest)  

    {

    biggest = ar[k];

   }

   }

printf(" biggest num is %d", biggest); // display the biggest number

return 0;

}

Output:

Enter the ten values:

12

2

4

5

123

45

67

453

89

789

biggest num is 789

Explanation:

Here we declared an array ar[10] of type int which store the 10 integer values.

Taking 10 integer input from the user in array ar .After that iterating the loop and finding the biggest number by using if statement  and store the biggest number in biggest variable .

Finally display biggest number.

What is the purpose of the "def" keyword in Python?

a) It is slang that means "the following code is really cool"

b) It indicates the start of a function

c) It indicates that the following indented section of code is to be stored for later

d) b and c are both true

e) None of the above

Answers

Answer:

d) b and c are both true.

Explanation:

The purpose of def keyword in python is to indicate start the function and it also indicates that the piece of code following the def keyword is to stored so that it can later be used in the program.

For ex:

def check(n):

   if n==10:

       return True

   return False

   

n=int(input("Enter an integer\n"))

if check(n):

   print("n is 10")

else:

   print("n is not 10")

In the above written code the function check is defined by using the keyword def.It also tells the interpreter to store the code because we will need it in future.

The correct option is (d) b and c are both true.

When The main purpose of the def keyword in python is to indicate the start of the function and also it indicates that the piece of code following the def keyword is to be stored so that it can later be used in the program.

Python

For ex:

After that def check(n):

Then if n==10:

Now the return True

return False

After that n=int(input("Enter an integer\n"))

Then if check(n):

Now, print("n is 10")

else:

print("n is not 10")

In the above-written code that is the function of the check is defined by using the keyword def. It also tells the interpreter to store the code because we will need it in the future.

Find out more information about Python here:

https://brainly.com/question/14492046

Java uses a right brace to mark the end of all compound statements. What are the arguments for and against this design?

Answers

Explanation:

The argument is for the right braces.The right braces are used for simplicity.The right brace always terminates a block of code or a function.

The argument against right brace is that when we see a right brace in a program,we are not obvious about the location of the corresponding left brace because all or multiple  statement end with a right brace.

Final answer:

Java's use of right braces to end compound statements ensures clear visual demarcation and structured code. However, it can also introduce syntax errors if not used correctly and limits coding style flexibility. The strict syntax provided by braces can be beneficial in preventing logic errors, especially when used with consistent indentation and statement-ending semicolons.

Explanation:

Using a right brace { } in Java to mark the end of compound statements is a design choice with its own set of pros and cons. One of the arguments in favor of this approach is the visual clarity it provides. With braces, it is immediately evident where a block of code begins and ends, which can be especially helpful with nesting multiple layers of logic and scopes within each other. Proper use of braces in conjunction with consistent indentation practices can greatly enhance the readability of the code.

On the other hand, there are some arguments against the obligatory use of braces, primarily focused on the potential for errors and the rigidity it imposes on coding style. For instance, if a programmer forgets to include a closing brace or places it incorrectly, it can lead to a syntax error. Furthermore, this requirement enforces a certain structure which might reduce the flexibility that programmers have in laying out their code, as seen in languages like Python which uses indentation rather than braces to denote blocks of code.

Additionally, in languages like JavaScript, omitting braces for single-line control structures is permissible, which can lead to more concise code but also introduces the potential for inconsistently coded programs and harder to detect logical errors. Therefore, while using braces imposes a strict syntax, it can prevent some types of logic errors that might occur when they are optional. The use of semicolons (;) at the end of each statement is another syntactic rule that complements the use of braces, indicating the end of one statement and the start of another.

What is the fundamental difference between a fat-client and a thin-client approach to client server systems architectures?

Answers

Client server architecture

In this set up, the servers are workstations which perform computations or provide services such as print service, data storage, data computing service, etc. The servers are specialized workstations which have the hardware and software resources particular to the type of service they provide.

Examples

1. Server providing data storage will possess database applications.

2. Print server will have applications to provide print capability.

The clients, in this set up, are workstations or other technological devices which rely on the servers and their applications to perform the computations and provide the services and needed by the client.

The client has the user interface needed to access the applications on the server. The client itself does not performs any computations while the server is responsible and equipped to perform all the application-level functions.

The clients interact with the server through the internet.

Clients can be either thin client or thick (fat) client.

The differences in them are described below.

1. Thin client, as per the name, performs minimal processing. Thick or fat client has the computational ability necessary for the client.

2. The thin client possesses basic software and peripherals and solely relies on the sever for its functionalities. Fat client has the resources needed to do the processing.

3. The user interface provided by the thin client is simpler and not rich in multimedia. The user interface provided by the fat client is much better and advanced.

4. Thin client relies heavily on the server. Fat client has low dependency on the server.

5. In the thin client set up, servers are present in more number. In this set up, servers are present in less number.

6. Each server handles a smaller number of thin clients since all the processing is done at the server end. Each server handles more thick clients since less processing is done at the server end.

Add a single line comment same as before that states you are doing calculations.

Answers

Answer:

//  you are doing calculations.

Explanation:

Here we add the single line comment i.e you are doing calculations by // forward slash. If you are making a comment more then the single line its better to use /* comments statements */.

For example:  

/* print welcome on screen  

print in nextline */

Following are the program in c++ language.

#include<iostream> // header file

using namespace std; // namespace

int main() // main method

{

int a=9,b=89; // variable declaration

//  you are doing calculations.

 int c=a+b;  

  cout<<c; // display c

   return 0;

}

Output:98

What is an independent data mart?

Answers

Answer: Independent data mart is the subset of data that is obtained from the data warehouse in independent form. Various traits are used for the display of the independent data marts.They are built in the independent manner from each other .

It is utilized by the organization for the analysis of the certain unit of data in compact form. Independent data mart does not persist the central data warehouse. The operational sources gets distributed in the independent section known as data marts. It is usually preferred by small organizations.

Write an if-else statement with multiple branches. If givenYear is 2101 or greater, print "Distant future" (without quotes). Else, if givenYear is 2001 or greater (2001-2100), print "21st century". Else, if givenYear is 1901 or greater (1901-2000), print "20th century". Else (1900 or earlier), print "Long ago". Do NOT end with newline.

Answers

Answer:

// here is code in c.

#include <stdio.h>

// main function

int main()

{

// variable to store year

int year;

printf("enter year:");

// read the year

scanf("%d",&year);

// if year>=2101

if(year>=2101)

{

printf("Distant future");

}

//if year in 2001-2100

else if(year>=2001&&year<=2100)

{

   printf("21st century");

}

//if year in 19011-2000

else if(year>=1901&&year<=2000)

{

  printf("20th century");

}

// if year<=1900

else if(year<=1900)

{

  printf("Long ago");  

}

return 0;

}

Explanation:

Read the year from user.After this, check if year is greater or equal to 2101 then print "Distant future".If year is in between 2001-2100 then print "21st century".If year is in between 1901-2000 then print "20th century".Else if year is less or equal to 1900 then print "Long ago".

Output:

enter year:2018                                                                                                            

21st century

Answer:

if ( givenYear >= 2101 ) {

        System.out.print("Distant future");

     }

     else if (givenYear >= 2001 ){

        System.out.print("21st century");

     }

     else if ( givenYear >= 1901 ) {

        System.out.print("20th century");

     }

     else {

        System.out.print("Long ago");

     }

Explanation:

Other Questions
Consider the following statements:a. Consumers buy more MP3 players from an electronics store that sells MP3 players at a lower price than other rival electronics stores in the area.b. Schools take steps to increase security since they believe it is more costly to allow vandalism than to hire additional security guards.c. Citrus growers produce more oranges when the selling price of oranges falls.Which of the above statements demonstrates that economic agents respond to incentives? Select 2-possible ointment bases. Select one or more:a. Hypromellose and CaCl2b. xanthan gumc. petroleum jellyd. Polyethylene glycol 4000/600 mixture Using Karnaugh maps, simplify the following Boolean function:F(a,b,c,d) = a' b' c' + b' c d' + a' b c d' + a b' c' A publisher prints 1,512 copies of a book in each print run. If they print 305 runs, how many books will be printed? A CPA firm should establish procedures for conducting and supervising work at all organizational levels to provide reasonable assurance that the work performed meets the firms standards of quality. To achieve this goal, the firm most likely would establish procedures for: If the perimeter of a square is 32 inches, what is the area The distance from Santa Maria to Los Alamos is 16.25 mi. what is the distance in meters? I need to solve this using dimensional analysis. My conversion factors are: 0.621 mi=1.00 km and 1 km = 1000 mplease help! Which of the following is an accurate comparison of the enumerated and implied powers of Congress? Enumerated power Implied power A Regulating the sale of commodities like alcohol Outlawing the sale of some drugs like marijuana B Coining money Maintaining a national bank C Drafting Americans into the military Maintaining the armed forces D Declaring war Passing a federal budget When a particular wave is vibrating with a frequency of 4.00 Hz, a transverse wave of wavelength 60 cm is produced. Determine the speed of waves along the wire. the relative velocity of two infinitely wide parallel platesthatare 1cm apart is 10cm/s. If the dynamic viscosity of theliquidbetween the plates is 0.001 N s/m2 what is theshearstress between the plates? How did going into debt to win the war impact the American colonies and the French How does the use of personification in the fourth stanza affect the prom the cremation of Sam McGee? A) it creates the idea that the north is so cold that even the stars are shiveringB) it suggest that the stars are controlling the fate of sam mcgees and the speaker.C) it makes the speaker seem like a imaginative person.D) it implies that the events of the poem takes place in fantasy rather than reality Question 1 with 12 blanks Nos encontrbamos (1) de la vieja ermita. Haca una tarde (2) y todos estaban con unas ganas (3) de comenzar la ascensin. (4) nosotros se eriga una montaa (5) con riscos (crags) (6) y granito (7) . El sol creaba claros y sombras que hacan de la pared un espectculo (8) . (9) la montaa podamos ver nubes (10) que se desplazaban lentamente (11) de la cumbre. Los cuatro alpinistas del equipo se mostraban (12) y listos para atacar la cumbre por su cara ms difcil: la cara norte. As English colonial society became more structured in the eighteenth century, what were the effects on women? a. Womens work became more clearly defined as tied closely to the home. b. Women bore so few children that population levels slightly declined in the 1740s, then stabilized until the American Revolution. c. Their workloads decreased thanks to technological advances such as the spinning wheel and to declining infant mortality rates. d. Women were permitted to practice law. e. They received more legal rights, such as the right to own property in their own names. Many states are carefully considering steps that would help them collect sales taxes on items purchased through the Internet. How many randomly selected sales transactions must be surveyed to determine the percentage that transpired over the Internet? Assume that we want to be 95% confident that the sample percentage is within two percentage points of the true population percentage for all sales transactions. Which of the following is a type of tissue in plants that is dead at maturity? a. Parenchyma b. Sclerenchyma c. Collenchyma d. All of these are alive at maturity. Answer the questions by drawing on the coordinate plane below.(a) Draw the image of APQR after a counterclockwise rotation of 90 about the originLabel the image APQ'R'. Complete the following conversions. You MUST show all of your work to receive full credit.Convert the following Hex numbers to decimal.a. FFFFb. 0123c. 005Fd. 026Ae. 73B0 Which object would have the most momentum? Most amino acids are specified by two to four different codons. This means that the genetic code is:a. nonoverlappingb. degeneratec. orderedd. non-degeneratee. universal