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
The act of using computer equipment to “break into” the computer systems of others?
zlopas [31]

Answer:

Hacking.

Explanation:

Breaking into other systems sounds like hacking.

3 0
2 years ago
If no other row matches, the router will select the ________ row as its best match. First Last either First or Last, depending o
zzz [600]

Answer:

Last

Explanation:

Routing is a term in engineering which involves the process of selecting a path for traffic in a network or across multiple networks. It is applicable in circuit-switched networks, such as the public switched telephone network (PSTN), and computer networks, such as the Internet. It is mostly used as a term for IP Routing.

Hence, in IP Routing, the first step is comparing the packet's destination IP address to all rows, followed by selecting the nest-match row. However, If no other row matches, the router will select the LAST row as its best match.

6 0
3 years ago
What single awk command can be used to display all the login names and their associated numerical user IDs
Luden [163]

Answer:

Used the command syntax; awk -F":" '{ print "username: " $<number location> "\t\tuid:" $<number location> }' <target folder>

Explanation:

Linux operating system is a fast open-source computer platform for programmers and network administrators. Its system is arranged in a hierarchical tree structure with the root represented as "/" (for absolute path).

The passwd is a folder in the Linux OS that holds the login details of all users in the system network. The 'awk' is one of the commands used to get information from a file in a folder. It prints out the result by specifying the location of the values (like the username and user id) as a variable (with prefix '$') and then the target folder.

8 0
3 years ago
Which option is the easiest way to configure macros in Access 2016?
zhuklara [117]
Number 2
Have a nice day
6 0
3 years ago
network consisting of computers and other devices that are eithrr fully or partially connected to each other
tekilochka [14]

The answer is a Mesh topology. This method connects every device to each other device in the network. A wired full-mesh topology is not as common as it is impractical and highly expensive. A partial mesh topology offers redundancy if one of the connections goes down and usually uses a connecting medium such as a router to eliminate cables and expensive PCI NIC's.

8 0
3 years ago
Other questions:
  • a computer that no longer works after having minor repair work done to it may have been damaged by ______.
    6·1 answer
  • Which of the following is a template definition?
    5·1 answer
  • What Software is used to play,create, and modify audio and video files
    7·2 answers
  • The array index can be any nonnegative integer less than the array size.
    10·1 answer
  • Which of the following people was a member of FFA?
    7·1 answer
  • Danielle, a help desk technician, receives a call from a client. In a panic, he explains that he was using the Internet to resea
    9·1 answer
  • Using the Vigenere cipher, does the length of the key matter?
    8·1 answer
  • Think about some of the most memorable and forgettable games ever created. They can be games that were
    15·1 answer
  • Today's Apple Mac computers run with the same internal hardware as the Windows-based PC.
    10·2 answers
  • UPS or FedEx plays what role in the supply?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!