[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]


    Search the Q&A Archives


...write a turbo c program that will determine whether...

<< Back to general questions

Question by junray
Submitted on 3/17/2004
Related FAQ: N/A
Rating: Rate this question: Vote
how to write a turbo c program that will determine whether the year inputted is a leap year the program should also display the corresponding month as requested with the number of days in a week.


Answer by Gus
Submitted on 8/24/2004
Rating: Not yet rated Rate this answer: Vote
for the year y, the following will evaluate to true for leap years and false for non-leap years.  (Of course, it's invalid for pre-Gregorian calendars.)

((y%4 == 0) && ((y%100 != 0) || (y%400 == 0)))

I'm not sure what you're asking for in the second half.

 

Answer by Teacher
Submitted on 8/25/2004
Rating: Not yet rated Rate this answer: Vote
Sounds like one of my students is trying to get everyone on the internet to do his classroom exercise for him!  Now Billy, you know that only us college types still use Turbo-C, so please go back to the lab this instant and start doing your own assignments!

 

Answer by ses
Submitted on 10/2/2005
Rating: Not yet rated Rate this answer: Vote
klllllllllll

 

Answer by raj
Submitted on 4/21/2006
Rating: Not yet rated Rate this answer: Vote
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
}

 

Answer by viking
Submitted on 6/28/2006
Rating: Not yet rated Rate this answer: Vote
what is  main .

 

Answer by sat
Submitted on 7/26/2006
Rating: Not yet rated Rate this answer: Vote
leap year = year%4==0||((year%400==0)&&(year%100==0))

 

Answer by jankarlo
Submitted on 11/30/2006
Rating: Not yet rated Rate this answer: Vote
#include<stdio.h>
main()
{
int num;
clrscr();
printf("Input a year: ");
scanf("%i", &num);
if(num%100=0)
{
  if(num%400=0)
  {
   printf("%i is a leap year.", num);
  }
}
if(num%4=0)
{
  printf("%i is a leap year.", num);
}
getch();
}

 

Answer by Anthony
Submitted on 1/27/2007
Rating: Not yet rated Rate this answer: Vote
Do your own homework

 

Answer by armand
Submitted on 1/29/2007
Rating: Not yet rated Rate this answer: Vote
i dont know

 

Answer by arman
Submitted on 2/1/2007
Rating: Not yet rated Rate this answer: Vote
write a turbo c program that will determine if a bus seat number is already reserved..

 

Answer by phenom
Submitted on 4/20/2007
Rating: Not yet rated Rate this answer: Vote
*
**
***
****
*****
****
***
**
*

 

Answer by phenom
Submitted on 4/20/2007
Rating: Not yet rated Rate this answer: Vote
*
**
***
****
*****
****
***
**
*

 

Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.


Your name or nickname:
If you'd like to create a new account or access your existing account, put in your password here:
Your answer:

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.

 

FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.

 

<< Back to general questions


[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

© 2008 FAQS.ORG. All rights reserved.