Link to home
Start Free TrialLog in
Avatar of sharath123in
sharath123in

asked on

creation of header files in c++

Here is my code for a small application to create header file and use it..but i am getting some error can any one suggest me what to do

time.h
.................

#include<stdio.h>
#include<math.h>
void main()
{

void secondstominutes();
void minutestohours();
void hourstodays();

}
void secondstominutes()
{
int value;
float min;
printf("\n give the value");
scanf("%d",&value);
min= (float)(value)/60;
min=ceil(min);
printf("\n%d min",min);
}
void minutestohours()
{
int value;
float hours;
printf("\n give the value");
scanf("%d",&value);
hours = (float)(hours)/60;
hours = ceil(hours);
printf("\n%d hours",hours);
}
void hourstodays()
{
int value;
float days;
printf("\n give the value");
scanf("%d",&value);
days=(float)(value)/24;
days=ceil(days);
printf("\n%d days",days);

}




....................
time.c
..........

#include<stdio.h>
 #include"time.h"
{
int choice, value;
printf("\n give choice\n 1. Convert seconds into minutes\n 2. Convert minutes into hours\n 3. Convert hours into days");
scanf("%d",&choice);
      if(choice==1)
      {

      secondstominutes();

      }
      else if(choice==2)
      {

      minutetohours();
      }
      else if(choice==3)
      {

      hourstodays();
      }
}
ASKER CERTIFIED SOLUTION
Avatar of _corey_
_corey_

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial