Answer:
// here is code in c.
#include <stdio.h>
// main function
int main()
{
// variable to store seconds
long long int second;
printf("enter seconds:");
// read the seconds
scanf("%lld",&second);
// if seconds is in between 60 and 3600
if(second>=60&& second<3600)
{
// find the minutes
int min=second/60;
printf("there are %d minutes in %lld seconds.",min,second);
}
// if seconds is in between 3600 and 86400
else if(second>=3600&&second<86400)
{
// find the hours
int hours=second/3600;
printf("there are %d minutes in %lld seconds.",hours,second);
}
// if seconds is greater than 86400
else if(second>86400)
{
// find the days
int days=second/86400;
printf("there are %d minutes in %lld seconds.",days,second);
}
return 0;
}
Explanation:
Read the seconds from user.If the seconds is in between 60 and 3600 then find the minutes by dividing seconds with 60 and print it.If seconds if in between 3600 and 86400 then find the hours by dividing second with 3600 and print it. If the seconds is greater than 86400 then find the days by dividing it with 86400 and print it.
Output:
enter seconds:89
there are 1 minutes in 89 seconds.
enter seconds:890000
there are 10 days in 890000 seconds.
Answer:
import
Explanation:
the <em>import </em>keyword is used to import external modules into a python script.
Explanation:
I think that you might have used it a lot or its just a glitch and will come back after some time.
It might be that your screen cracked.
But try re-booting if that does not work, wait and take off the battery.
Answer:
See explaination
Explanation:
#include <fstream>
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
// Fill in the code to define payfile as an input file
ifstream payfile;
float gross;
float net;
float hours;
float payRate;
float stateTax;
float fedTax;
cout << fixed << setprecision(2) << showpoint;
// Fill in the code to open payfile and attach it to the physical file
// named payroll.dat
payfile.open("payroll.dat");
// Fill in code to write a conditional statement to check if payfile
// does not exist.
if(!payfile)
{
cout << "Error opening file. \n";
cout << "It may not exist where indicated" << endl;
return 1;
}
ofstream outfile("pay.out");
cout << "Payrate Hours Gross Pay Net Pay"
<< endl << endl;
outfile << "Payrate Hours Gross Pay Net Pay"
<< endl << endl;
// Fill in code to prime the read for the payfile file.
payfile >> hours;
// Fill in code to write a loop condition to run while payfile has more
// data to process.
while(!payfile.eof())
{
payfile >> payRate >> stateTax >> fedTax;
gross = payRate * hours;
net = gross - (gross * stateTax) - (gross * fedTax);
cout << payRate << setw(15) << hours << setw(12) << gross
<< setw(12) << net << endl;
outfile << payRate << setw(15) << hours << setw(12) << gross
<< setw(12) << net << endl;
payfile >> hours ;// Fill in the code to finish this with the appropriate
// variable to be input
}
payfile.close();
outfile.close();
return 0;
}