Resources » Articles/Knowledge Sharing » Computer & Technology

Basic C++ program to calculate your age


Posted Date: 08-Nov-2008  Last Updated:   Category: Computer & Technology    
Author: Member Level: Gold    Points: 3






#include
#include
#include
void main()
{
clrscr();
int a=365,b=60,c=60,d=24;
int age;
long int sec;
cout<<"enter YOUR AGE IN YEARS:";
cin>>age;
sec=age*a*b*c*d;
cout<<"you have wasted"<getch();
}


Did you like this resource? Share it with your friends and show your love!




Responses to "Basic C++ program to calculate your age"

No responses found. Be the first to respond...

Feedbacks      

Post Comment:




  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)



    Type the numbers and letters shown on the left.


    Submit Article     Return to Article Index

    Awards & Gifts
    Active Members
    TodayLast 7 Daysmore...

    ISC Technologies, Kochi - India. Copyright © All Rights Reserved.