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);
}
Answer:
I'm not gonna give you the answer. I want you to think about this what is math, what is science, how does it help the world, and etc. These are some example questions to help.
Explanation:
The answer is two. Most people think it's one but it's 2
Answer:
In most programming languages "" are required around text.
Explanation:
Python: print("text")
HTML: <p>text</p>
C++: int Main() {
cout << "text" << endl;
}
Lua: print("text")
Answer:
A game is built from a combination of sub-tasks in order to provide the best experience to the user and make sure that the interface is comprises of only the results of the ongoing sub-tasks to provide a higher degree of data abstraction.
Data abstraction refers to the process of representing the essential information without including the background details. Rolling a dice is preferred to be a sub-task so that the user only gets to know about the result of the roll and does not have to wait for or anticipate the result. Moreover, a game may consist of n number of sub-tasks so it is not a good idea to include them in the main framework and are preferred to be abstracted.