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
RoseWind [281]
4 years ago
5

Hello everyone. I need help. C programming. Create at least two more functions except the main () function to collect them.

Computers and Technology
1 answer:
Andrew [12]4 years ago
3 0

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

}

You might be interested in
What is an example of a reputable website
Keith_Richards [23]
A reputable website would be one that you could research online and read about it's history , reviews etc .
4 0
3 years ago
Read 2 more answers
1 byte =???? bit<br> please help me
diamong [38]

Answer:

8 bits make a byte

Explanation:

8 bits make a byte

7 0
3 years ago
1 Let Σ= {Ac,BA,bcb,cd,ab,d,i}. Find the length for the given below strings
Zepler [3.9K]

Answer:

What in the world

Explanation:

4 0
3 years ago
Ellen's laptop has a built-in 802.11n-capable wireless NIC. The wireless NIC worked perfectly yesterday when she loaned it to he
Flura [38]

Answer:

The NIC is disabled in CMOS

Explanation:

CMOS refers to the Complementary Metal Oxide Semiconductor.  It is a technology that is used to generated integrated circuits.

It can be found in various types like microprocessors, batteries, etc

While on the other hand the NIC refers to the network interface controller in which the component of the computer hardware has connected the computer to its network. It can be done via wired and wireless.

Since in the given situation, it is mentioned that Ellen is not able to access the internet through wireless NIC neither it is visible in network connections nor it is shown in device manager so first she assumes that is nic is disabled in CMOS

and the same is to be considered

6 0
3 years ago
How has the Internet of Things affected business
PilotLPTM [1.2K]

Answer:

With better information about the consumers and the market, the productivity of any business can be increased notably. IoT devices can be connected to each other and controlled to improve efficiency, which in turn has direct effects on the productivity of the business. More can be done in less time.

Explanation:

4 0
3 years ago
Other questions:
  • When Aaron was called for an interview at a graphic designing company, his first interview test assessed his creativity and his
    7·2 answers
  • Where in an email would u find information about the action requirements​
    9·1 answer
  • Write a filter that reads in a sequence of integers and prints the integers, removing repeated values that appear consecutively.
    5·2 answers
  • Java: which expression is evaluated first
    13·1 answer
  • Plzz help will mark brainliest
    6·1 answer
  • Do u have to divide or multiply this problem 5300 yd = mi
    9·1 answer
  • What do u mean by generation of computer
    10·1 answer
  • Write a program that prompts the user for a word or phrase, and determines if the entry is a palindrome. A palindrome is a word
    9·1 answer
  • How to code for a database?​
    6·1 answer
  • Describe from an administrator perspective what is necessary to prepare a storage device for access by a user.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!