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
Marat540 [252]
3 years ago
8

Consider the following line of code: price= input(Please enter the price: ") What would be the next line in your code that will

allow you to store the price as a decimal number price price(decimal) price float(price) price decimal(price) price int(price
Computers and Technology
1 answer:
hodyreva [135]3 years ago
6 0

Answer:

price float(price)

Explanation:

There are four basic type of data type use in the programming to declare the

variable.

1. int:  it is used for integer values.

2. float:  it is used for decimal values.

3. char:  it is used for character values

4. Boolean: it is used for true or false.

in the question, the one option contain the data type float (price float(price)). So, it store the value in decimal.

price int(price):  it store the value in integer.

price decimal(price):  it is wrong declaration of variable. their is no data type in the programming which name is decimal.

price price(decimal):  it is wrong declaration of variable. their is no data type in the programming which name is price.

You might be interested in
Ryan needs to see the space available to insert content on a slide in his presentation. Which feature of a presentation program
MariettaO [177]

Answer:

Layout

Explanation:

answer exists on

brainly.com/question/3749015

5 0
3 years ago
Write a program that reads an integer, a list of words, and a character. The integer signifies how many words are in the list. T
hammer [34]

Answer:

In C++:

#include<iostream>

#include<vector>

using namespace std;

int main() {

int len;

cout<<"Length: ";  cin>>len;

string inpt;

vector<string> vect;

for(int i =0;i<len;i++){

   cin>>inpt;

   vect.push_back(inpt); }

char ch;

cout<<"Input char: ";  cin>>ch;  

for(int i =0;i<len;i++){

   size_t found = vect.at(i).find(ch);  

       if (found != string::npos){

           cout<<vect.at(i)<<" ";

           i++;

       }

}  

return 0;

}

Explanation:

This declares the length of vector as integer

int len;

This prompts the user for length

cout<<"Length: ";  cin>>len;

This declares input as string

string inpt;

This declares string vector

vector<string> vect;

The following iteration gets input into the vector

<em>for(int i =0;i<len;i++){ </em>

<em>    cin>>inpt; </em>

<em>    vect.push_back(inpt); } </em>

This declares ch as character

char ch;

This prompts the user for character

cout<<"Input char: ";  cin>>ch;  

The following iterates through the vector

for(int i =0;i<len;i++){

This checks if vector element contains the character

   size_t found = vect.at(i).find(ch);  

If found:

       if (found != string::npos){

Print out the vector element

           cout<<vect.at(i)<<" ";

And move to the next vector element

           i++;

       }

}  

4 0
3 years ago
What are the methods used in research methodology?
earnstyle [38]
Experiments. ...
Surveys. ...
Questionnaires. ...
Interviews. ...
Case studies. ...
Participant and non-participant observation. ...
Observational trials. ...
Studies using the Delphi method.
5 0
2 years ago
What do you understand by Multiprotocol Label Switching, how it works and is helpful in today's network scenario.
Minchanka [31]

Answer:

Multiprotocol Label Switching (MPLS): It is a routing technique in telecommunications networks that transfers data from 1 node to next node based upon shortest paths instead of long network addresses, hence it avoids rigorous findings in a routing table and speeds the flow of traffic

MPLS provides better performance,scalability,better bandwidth utilization,a better end-user experience and reduced network congestion.Hence it is useful in today's network scenario.

7 0
3 years ago
A Uniform Resource Locator (URL) is a formatted string of text that web browsers, email applications, and other software program
Fiesta28 [93]

The purpose of a URL is to help users get to websites easier. A URL (Uniform resource locator) is that tab at the top of your web browser that you type into. Like if you want to go to google, you would type in Google.com. So the answer is true.

6 0
3 years ago
Read 2 more answers
Other questions:
  • In what country did true printing first take place?
    12·2 answers
  • Double clicking a word selects the entire word?
    10·1 answer
  • The max-age attribute of a cookie is specified in
    13·1 answer
  • What fields of engineering are in Biomedical
    7·1 answer
  • What color is the smartart tolls tab?
    5·1 answer
  • " In which software generation did the distinction between systems programmers and other programmers first surface?"
    15·1 answer
  • In which client/server relationship can a computer act as both a client AND a server? Select one: a. X-Windows b. SSH c. Classic
    8·1 answer
  • The sameNumber method checks to see if the number of words in the phrase, numwords, is the same number of words contained in the
    5·1 answer
  • Which tool can be used to increase the space between a bullet point or a number and text?
    11·2 answers
  • What is the difference between computer hardware and computer software?<br>​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!