. double x = 5; declares that x is a...............variable.

Answers

Answer 1

Answer:

x is a double type variable.

Explanation:

Here is x is a variable of type double which stores the value 5. The main purpose of a double datatype is storing the decimal point values. The precision of double datatype is two times more than the precision of float datatype. So on displaying the value of x in c++ it prints "5".

Following are the program of double datatype in c++

#include <iostream> // header file

using namespace std; // namespace  

int main() // main function

{

  double x=5; // variable declaration

  cout<<x; // displaying the value of x

  return 0;

}

Output:

5


Related Questions

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.

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.

How does a sentiment analysis work?

Answers

Answer:

 The sentiment analysis is one of the type of the data mining that basically measure the computational linguistics and inclination of the text analyses.

The sentiment analysis is important and extremely useful for monitoring in the social media and then overview on certain topics.  

It is basically works on the principle of NLP (Natural language processing), that is used to extract the information and analyzes the various information in the system.

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).

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.

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.  

__________ 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 redundancy? What problems are associated with redundancy?

Answers

Answer:

Redundancy is the mechanism that occurs in database's data as the same data is stores in the multiple location.It creates repeated data by accident or for backup purpose.

The issues that arise due to the redundancy of the data is the storage space in database gets consumed and thus wastes the space in storing information in multiple locations.When any update occurs in the stored data's field value , it also has to be changed in the multiples occurrences.

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.

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 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

What is the smallest floating number can be represented in C++? -3.4*10^38

Answers

Answer:

FLT_MIN.

Explanation:

In C++ FLT_MIN is used to represent the smallest floating point number.You have to include two libraries for FLT_MIN to work and these are as following:-

limits.h

float.h

for example:-

#include <iostream>

#include<limits.h>

#include<float.h>

using namespace std;

int main() {

   cout<<FLT_MIN;

return 0;

}

Output:-

3.40282e+38

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.

Explain the HTTP protocol in your own words. (up to 150 words

Answers

Answer:

HTTP protocol is basically stand for the hyper text transfer protocol. It is an application protocol that is basically distributed and collaborative. The hypertext transfer protocol is the foundation of the data communication in the WWW( world wide web).

It is basically work between the client and the server as the request response.

It is generally used in the transmission control protocol (TCP) for the communication with the server. The HTTP is basically used in the wireless communication.

Find the root using bisection method with initials 1 and 2 for function 0.005(e^(2x))cos(x) in matlab and error 1e-10?

Answers

Answer:

The root is:

[tex]c=1.5708[/tex]

Explanation:

Use this script in Matlab:

-------------------------------------------------------------------------------------

function  [c, err, yc] = bisect (f, a, b, delta)

% f the function introduce as n anonymous function

%       - a y b are the initial and the final value respectively

%       - delta is the tolerance or error.

%           - c is the root

%       - yc = f(c)

%        - err is the stimated error for  c

ya = feval(f, a);

yb = feval(f, b);

if  ya*yb > 0, return, end

max1 = 1 + round((log(b-a) - log(delta)) / log(2));

for  k = 1:max1

c = (a + b) / 2;

yc = feval(f, c);

if  yc == 0

 a = c;

 b = c;

elseif  yb*yc > 0

 b = c;

 yb = yc;

else

 a = c;

 ya = yc;

end

if  b-a < delta, break, end

end

c = (a + b) / 2;

err = abs(b - a);

yc = feval(f, c);

-------------------------------------------------------------------------------------

Enter the function in matlab like this:

f= @(x) 0.005*(exp(2*x)*cos(x))

You should get this result:

f =

 function_handle with value:

   @(x)0.005*(exp(2*x)*cos(x))

Now run the code like this:

[c, err, yc] = bisect (f, 1, 2, 1e-10)

You should get this result:

c =

   1.5708

err =

  5.8208e-11

yc =

 -3.0708e-12

In addition, you can use the plot function to verify your results:

fplot(f,[1,2])

grid on

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]

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.

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.

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

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.

Explain how arrays allow you to easily work with multiple values?

Answers

Explanation:

Array is data structure which stores item of similar data type in contiguous form.Arrays used indexing to access these items and the indexing is form 0 to size -1.

Array is used to store multiple values or items in them.It is easier to access these items in array as we can do it in O(1) time if we know the index where it is not possible in the other data structures like linked list,stacks,queues etc.

Accessing element:-

array[index];

This statement will return the value of the item that is stored at the index.

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.

What year did the USA gain independance from the British Empire? Right answer 1774.

Answers

Answer:

USA gain independance from the British Empire on 4th july , 1776

Explanation:

USA gain independance from the British Empire on 4th july , 1776

Declaration of Independence was adopted by the Continental Congress on July 4, 1776

British Empire colonial territories in the America from 1607 to 1783 time

and 30 Colonies were declared their independence in the "American Revolutionary War " from 1775 to 1783  

and formed the United States of America

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.

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

What are the three main goals of the CIA Security Triad and what are the most common gaps you see exploited today?

Answers

Answer: CIA security triad is the triangular working model that contains three main aims that are as follows :-

ConfidentialityIntegrityAvailability.

These aims acts as the principle on which this model works and assure the system about. CIA triad provides the security to the business organization for the information security.

It helps in maintaining the confidentiality of the information, secures the unity and wholeness of data in the form of integrity and provides data as per requirement is known as availability.

The major drawback rising these days in the model which can exploit the system is the growing and enhancing hacking techniques for attacking the information system and this also effects the CIA triad as they need to improve the security level.The CIA  security triad is also considered as system that increasing it's cost according to time.

A simple but widely-applicable security model is the CIA triad; standing for Confidentiality, Integrity and Availability; three key principles which should be guaranteed in any kind of secure system.

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.

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.

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
Complete Martns speech about the Spanish Club with the correct forms of ser.Mi amigo Leandro ____________________ el presidente del club. Recovery from a severe metabolic acidosis is most dependent on which of the following? A. The rate of ventilation to blow off excess CO2 B. The rate of H+ secretion by the kidney C. The rate of H+ excretion by the kidney D. The arterial pH E. The arterial PCO2 Gregor Mendel carried out breeding experiments with garden peas in his monastery. Based on his experimental results he was able to explain how traits are inherited. This would be an example of deductive reasoning? Pedro planted 15 plants in his garden is 45 minutes. How long did it take him to plant 5 plants? what causes water to become denser when it is carried to the poles by surface currents?? Which of the following would be a good name for the function that takes the weight of a box and returns the energy needed to lift it ? What is the negation of the following statement: "n is divisible by 6 or n is divisible by both 2 and 3."A. n is not divisible by 6 or n is divisible by both 2 and 3.B. n is not divisible by 6 and n is divisible by both 2 and 3.C. n is divisible by 6 or n is divisible by both 2 and 3.D. n is divisible by 6 and n is not divisible by both 2 and 3.E. n is divisible by 6 and n is divisible by both 2 and 3.F. n is not divisible by 6 or n is not divisible by both 2 and 3.G. n is divisible by 6 or n is not divisible by both 2 and 3.H. n is not divisible by 6 and n is not divisible by both 2 and 3. Find P-1, where P = [adg beh cfi] is orthogonal. Which of the following statements best explains why the auditing profession has found it essential to promulgate ethical standards and to establish means for ensuring their observance? A. Ethical standards that emphasise excellence in performance over material rewards establish a reputation for competence and character. B. Vigorous enforcement of an established code of ethics is the best way to prevent unscrupulous acts. C. A distinguishing mark of a profession is its acceptance of responsibility to the public. D. A requirement for a profession is to establish ethical standards that stress primarily a responsibility to clients and colleagues. Why is the earth considered a dynamic planet? What are its three concentric layers and there properties? What is the mass, in g, of one molecule of ethane, C2H6?A. 3.0 x 10-23B. 5.0 x 10-23C. 30D. 1.8 x 1025 Which of the following statements regarding the exercise of options contracts are TRUE? The exercise of equity options settles the next business day. The exercise of equity options settles in 2 business days. The exercise of index options settles next business day. The exercise of index options settles in 2 business days. Suppose you are driving to visit a friend in another state you are driving at an average rate of 50 mph you must drive a total of 480 miles if you have already driven 130 miles how long would it take you to reach your destination? Discuss the mechanisms and consequences of ADH and aldosterone on the kidneys, in detail. Line segment Z E is the angle bisector of AngleYEX and the perpendicular bisector of Line segment G F. Line segment G X is the angle bisector of AngleYGZ and the perpendicular bisector of Line segment E F. Line segment F Y is the angle bisector of AngleZFX and the perpendicular bisector of Line segment E G. Point A is the intersection of Line segment E Z, Line segment G X, and Line segment F Y. Triangle G E F has angles with different measures. Point A is at the center. Lines are drawn from the points of the triangle to point A. Lines are drawn from point A to the sides of the triangle to form right angles and line segments A X, A Z, and A Y. Which must be true? Please Hurry I don't have a lot of time to finsh my test! These four elements are most likely in group Which branch of government makes laws?OOA. LegislativeB. ExecutiveC. MilitaryOOD. JudiciarySUBM classification for square root 2 A vector has an x-component equal to 0.15 and a y-component is equal to 1.22 calculate the vectors direction relative to the positive x-axis what are the similarities between data mining and data analytics