help: turbo c program about todays date and tomorrow's, how? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

help: turbo c program about todays date and tomorrow's, how?

shaieenshaieen Posts: 20Member

PROBLEM: [b]Write a program that prompts the user for today's date and calculates tomorrow's date. Then it must display both dates of today and tomorrow.[/b]

here's my code. the problem is, i don't know how to really make codes about this. it did run but the dates were not exact,i mean it gives error numbers. could you help?And please, put some /*NOTES*/ huh? Thanks..

[code]
#include
#include

struct date{
int month, day, year;
};
int todays_date;
main(){
system("cls");
struct date dates[10];
int i;

printf("Please enter the date today(dd:mm:yy)");
scanf("%d:%d:%d",todays_date);
printf("The date today is: %d",todays_date);
for(i=0;i<2;i++){
printf("Tomorrow's date is: %d:%d:%d",&dates[i].month,&dates[i].day,&dates[i].year);

getch();

}[/code]

[img]http://dl4.glitter-graphics.net/pub/331/331684xj092y2079.gif[/img]
Sign In or Register to comment.