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
Lynna [10]
3 years ago
14

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

Computers and Technology
1 answer:
brilliants [131]3 years ago
7 0

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

You might be interested in
Lan is working on a project report that will go through multiple rounds of
Levart [38]
Its either D or A but im pretty sure its D??
8 0
3 years ago
write an application to presell a limited number of cinema tickets. each buyer can buy as many as 4 tickets. No more than 100 ti
Rus_ich [418]

Answer:

The program for this question can be given as:

Program:

import java.util.*;  //import package

public class TicketSeller  //define class

{

public static void main(String ar[])  //main method

{

int totalTickets=100,userCount=0,remainingTickets=100,numTickets; // varaibale

try           //try block

{

Scanner ob= new Scanner(System.in);  //input by user

System.out.println("Total Tickets:"+totalTickets);

while(remainingTickets!=0)          //loop

{

System.out.print("Enter no of Tickets to buy:");      //message.

numTickets=ob.nextInt(); //taking input

if(numTickets<=4)         //conditional statements.

{

if(remainingTickets>=numTickets)

{

remainingTickets=remainingTickets-numTickets;              //calculate remainingTickets

userCount++;

System.out.println("remaining tickets : "+remainingTickets+" user :"+userCount);      

}

else

{

System.out.println("Invalid Input");

}

}

else

{

System.out.println("Invalid Input");

}

}

}

catch(Exception e)            //catch block.

{

}

}

}

Output:

Total tickets:100

Enter no of Tickets to buy: 4

Remaining tickets : 96 User :1

Enter no of Tickets to buy: 4

Remaining tickets : 92 User :2

Enter no of Tickets to buy: 4

Remaining tickets : 88 User :3

.

.

.

Enter no of Tickets to buy: 4

Remaining tickets : 0 User :25

Explanation:

In the above Program firstly we import the package for the user input. Then we declare the class that is (TicketSeller) given in question. In this class we declare the main method in the main method we declare the variable that is totalTickets, userCount, remainingTickets and numTickets .Then we use the exception handling. we use this for providing the validation from the user side that users don't insert value less the 4. In the exception handling, we use the multiple catch block with try block. Then we input from the user and calculate the values and in the last, we print all the values.

8 0
2 years ago
Are storage devices input devices
Nonamiya [84]

Answer:

Exphfbdplanation:

8 0
3 years ago
Read the following example cover letter:
enot [183]

Answer:

All should be added.

Explanation:

All of these are important to your cover letter to make it seem professional.

Hope this helped

3 0
3 years ago
Read 2 more answers
Sarah has prepared a project document about the small and medium-sized companies in the United States. While proofreading, she r
erik [133]
The answer is F7. When you click F7 it highlights key words.<span />
3 0
2 years ago
Read 2 more answers
Other questions:
  • In addition to not parking where signs prohibit it, you should never park __________________.
    12·1 answer
  • A software programâs _________ indicates what can legally be done with that program.]
    5·1 answer
  • Which of the following best define grit
    13·1 answer
  • COMPUTER SCIENCE:PIXELS
    5·1 answer
  • An individual who understands and uses a variety of symbols yet uses one symbol at a time to share a message needs more developm
    10·1 answer
  • A ________ is a member function that is automatically called when a class object is
    6·1 answer
  • Write a program which populates an array with integer values read from a file. We do not know how many integers are in the file,
    8·1 answer
  • Multiple Choice: We have been assigned the task of developing a software testing tool (tester) that can assess reachability of s
    11·1 answer
  • Which of the following behaviors does not harm a company if your employment is terminated?
    9·1 answer
  • The __________ operator increases the value of the variable by 1 after the original value is used in the expression in which the
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!