Answer: xD = haha
Explanation:
XD looks like a haha face laughing :P
have a good day :)
Is there anything about this question?
Answer:
FALSE
Explanation:
The exit function is used to terminate or halt the process.
Syntax-
void exit(int status)
Exit function (exit()) can be used in any function not only main() and it will terminate your whole process.
<u></u>
<u>Example-</u> C Program
#include<stdio.h>
#include <stdlib.h>
// function declaration
float exitexample ( float x );
// Driver program
int main( )
{
float a, b ;
printf ( "\nEnter some number for finding square \n");
scanf ( "%f", &a ) ;
// function call
b = exitexample ( a ) ;
printf ( "\nSquare of the given number %f is %f",a,b );
/*This will not printed as exit function is in exitexample() function*/
}
float exitexample ( float x ) // function definition
{
exit(0); //exit function
float p ;
p = x * x ;
return ( p ) ;
}
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);
}