I have just started learning c,i had already learned c++.So,i m rookie in c programming.I have written a program in c++,i want it to be converted to c program.So,plz do me a favour.
Plz convert the following c++ source code to c source code:
Code:
#include <iostream.h>
#include<conio.h>
#include <time.h>
#include<string.h>
void main ()
{int Day[12]={31,28,31,30,31,30,31,31,30,31,30,31};
char nameday[7][10]={"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};
int mo,dy,yr,c=0,j;
cout<<"Enter Years:";
cin>>yr;
if(yr<1928) ;
yr-=1928;
j=(yr)/4;
yr%=7;
cout<<"Enter month:";
cin>>mo;
if(mo<1 || mo>12) ;
cout<<"Enter day:";
cin>>dy;
if(dy<1 || dy>31) ;
for(int i=0;i<mo-1;i++)
{
c+=Day[i];
}
dy+=yr;
c+=dy;
c+=j;
c%=7;
cout<<nameday[c]<<endl;
getch();
}