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]
3 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]3 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
PowerPoint displays many that are varied and appealing and give you an excellent start at designing a presentation. However, you
Jet001 [13]

Answer:

The answer is themes.

Power point displays many <u>themes</u>

Explanation:

A power point theme is a combination of effects,fonts and colors that can be applied to the presentation.It makes the presentation more attractive and beautiful if used properly and smartly.Power point has built in themes that gives excellent start to your presentation.

5 0
3 years ago
If I write too much for an exam answer, do I get downgraded?
Degger [83]

Answer:

I don't think so

Explanation:

4 0
3 years ago
How to be fluent in computer
Setler79 [48]

Explanation:

1. Seeing people do technological innovations, so you have some motivation and inspiration to be fluent in computer

2. Try experimenting and trying stuff, like trying to learn how to code, how the internet work, etc.

3. work more with computers, for example, make a note with OneNote, making digital art with blender, adobe illustrator etc.

4. Try to learn how to be better at learning computer, like, if you do mistakes in your learning journey, try to avoid it next time

5. good luck ;)

7 0
2 years ago
Read 2 more answers
Can you please look through this code and see wants wrong with it? its in python
Ivanshal [37]
I’m confused what are you trying to ask? What is the python?
3 0
2 years ago
Organisms that reproduce sexually​
weqwewe [10]

Sex glad is responsible

3 0
3 years ago
Other questions:
  • What is safe mode?
    9·1 answer
  • When might be the best time to start saving for retirement?
    5·2 answers
  • Which type of password would be considered secure
    13·2 answers
  • A school principal trying to find out if parents will help buy new playground equipment shows digital leadership by.
    8·2 answers
  • You are given an integer N, followed by N lines of input (1 &lt;= N &lt;= 100). Each line of input contains one or several words
    8·1 answer
  • What are the names of the four major varnas in the caste system?​
    9·2 answers
  •  Which device containing sensors send signals to the computer whenever light changes are detected? 
    11·1 answer
  • Which of these five are Netflix Originals?1/5
    5·1 answer
  • What does a hanging indent look like?
    7·1 answer
  • What technology would a bank's website use a scramble information as it is transmitted over the Internet
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!