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
vlabodo [156]
3 years ago
7

Write a program that checks for car mileage. if the mileage is greater than 100000, display "clunker!". if not, display "buy it!

"
Computers and Technology
1 answer:
Troyanec [42]3 years ago
3 0
Should be easy to write this program. You need to define function that takes number as input and use if else condition to decide what to print.

For example in Python:

def checkCarMileage(mileage):
    if mileage > 100000:
        print("clunker!")
    else:
        print("buy it!")
You might be interested in
If Nancy receives an encrypted message from Matthew, which key does she use to read it? Nancy’s private key Nancy’s public key M
Juliette [100K]

Answer:

Nancy's private key

Explanation:

She's receiving it.  That means Matthew used her public key to encrypt it.  She should decrypt it using her private key.  Watch this video for clarification :)

Watch The Internet: Encryption & Public Keys on the big video site which cannot be named on brainly :p

7 0
3 years ago
In a relational database application, a(n) ________ key is used to link one table with another.
mr_godi [17]

In a relational database application, a <u>foreign key</u> is used to link one table with another.

<h3>What is a foreign key?</h3>

In database management system (DBMS), a foreign key can be defined as a column whose value provides a link between the data that are stored in a table or relational database.

This ultimately implies that, a <u>foreign key</u> is used to link one table with another in a relational database application.

Read more on keys here: brainly.com/question/8131854

#SPJ12

6 0
1 year ago
Hello everyone. I need help. C programming. Create at least two more functions except the main () function to collect them.
Andrew [12]

Answer:

Explanation:

#include <iostream>

using namespace std;

int costdays(int);

int costhrs(int,int);

int main()

{

   int dd,hh,mm,tmph,tmpd,tmpm=0;

   int pcost,mcost=0;

   cout<<"Enter Parking time" << endl;

   cout<<"Hours: ";

   cin>>hh;

   cout<<"Minutes: ";

   cin>>mm;

   

   if (mm>60)

   {

       tmph=mm/60;

       hh+=tmph;

       mm-=(tmph*60);

   }

   if (hh>24)

   {

       tmpd=hh/24;

       dd+=tmpd;

       hh-=(tmpd*24);

   }

   if ((hh>4)&&(mm>0))

   {

       pcost+=costdays(1);

   }

   else

   {

       mcost=costhrs(hh,mm);

   }

   cout<<"Total time: ";

   if (dd>0)

   {

       cout<<dd<<"days ";

       pcost+=costdays(dd);

   }

   pcost+=mcost;

   cout<<hh<<"h "<<mm<<"mins"<<endl;

   cout<<"Total Cost :"<<pcost<<"Won";

   return 0;

}

int costdays(int dd)

{

   return(dd*25000);

}

int costhrs(int hh,int mm)

{

   int tmpm, tmp=0;

   tmp=(hh*6)*1000;

   tmp+=(mm/10)*1000;

   tmpm=mm-((mm/10)*10);

   if (tmpm>0)

   {

       tmp+=1000;

   }

   return(tmp);

}

3 0
3 years ago
Define a function compute_gas_volume that returns the volume of a gas given parameters pressure, temperature, and moles. Use
jeyben [28]

Question:

Define a function compute_gas_volume that returns the volume of a gas given parameters pressure, temperature, and moles. Use the gas equation PV = nRT, where P is pressure in Pascals, V is volume in cubic meters, n is number of moles, R is the gas constant 8.3144621 ( J / (mol*K)), and T is temperature in Kelvin.

Answer:

This solution is implemented in C++

double compute_gas_volume(double P, double T, double n){

   double V = 8.3144621 * n * T/P;

   return V;

}

Explanation:

This line defines the function, along with three parameters

double compute_gas_volume(double P, double T, double n){

This calculates the volume

   double V = 8.3144621 * n * T/P;

This returns the calculated volume

   return V;

}

To call the function  from the main, use:

<em>cout<<compute_gas_volume(P,T,n);</em>

<em />

<em>Where P, T and n are double variables and they must have been initialized</em>

5 0
3 years ago
What is one major component that would not be found in a tablet or phone, and how has modern computing made that component less
IRISSAK [1]

Answer:

A hard drive

Explanation:

Since tablets and phones are compact, they are better off not having a big, giant, bulky storage device like hard drives. Modern computing made hard drives less important by developing Solid-State Drives (SSDs) and extremely dense (512 bit) storage that can provide the same if not more storage than a traditional hard drive at the fraction of the size.

5 0
3 years ago
Read 2 more answers
Other questions:
  • A file to which information is written is referred to as a(n) ____ file.
    8·1 answer
  • Design a Geometry class with the following methods: A static method that accepts the radius of a circle and returns the area of
    15·1 answer
  • Which extension is appropriate for Word document templates?
    10·2 answers
  • The number of square units required to cover a surface.
    13·1 answer
  • Which of the following is not a shared characteristic of new media.
    8·1 answer
  • What does lurch mean
    14·2 answers
  • Edie wants to visit her university's website. What software application should she use?
    9·2 answers
  • Which marketing strategy is represented by advertisers paying for online display ads?
    8·1 answer
  • 1. Who was the first lady programmer?​
    14·2 answers
  • If you do a Find and Replace for a term, where will Word begin looking for the term?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!