Answer:
EXAMPLE -
Create a variable and assign your age
var myage = 32;
type your age:
console.log(my age) ;
Notice that we did not type the actual numeric age. We used the variable instead. There wouldn’t be any purpose of declaring a variable if we were going to type 32 directly.
This makes the scrip more portable which means that the result on the screen is independent of the code console.log(myAge); . If we need to change our age all we have to do is to assign another number to the variable myAge and the output will change automatically. That’s the purpose of a variable.
c. An error that due to wrong input.
=> Bug
<em>Hope </em><em>it</em><em> is</em><em> helpful</em><em> to</em><em> you</em>
1989 - philips CDi / FM Towns
1991 - Sega MegaCD (genesis CD) / Commodore CDTV / FM Towns Marty
1993 - 3DO / CD32
1995 - Sega Saturn / Sony Playstation
1997 - Projected date for 3DO's M2 but was shelved afaik
1999 - Nintendo Gamecube / Sega Dreamcast / Sony Playstation2
2002 - Microsoft Xbox
2004 - Nintendo Wii
2005 - Microsoft Xbox360
2006 - Sony Playstation3__________________
<span>
A500 GVP530
A600 Vampire-ized!
A1200 BlizIV030scsi
A1200 Bliz040scsi
A1200 BlizPPC/040/scsi/BvPPC
A3000 CybIII060
A4000 C=040
CD32</span>
Answer:
#include<iostream>
#include<cmath>
#include <ctime>
using namespace std;
int main()
{
time_t t = time(NULL);
tm* timePtr = localtime(&t);
cout << "seconds= " << (timePtr->tm_sec) << endl;
cout << "minutes = " << (timePtr->tm_min) << endl;
cout << "hours = " << (timePtr->tm_hour) << endl;
cout << "day of month = " << (timePtr->tm_mday) << endl;
cout << "month of year = " << (timePtr->tm_mon)+1 << endl;
cout << "year = " << (timePtr->tm_year)+1900 << endl;
cout << "weekday = " << (timePtr->tm_wday )<< endl;
cout << "day of year = " << (timePtr->tm_yday )<< endl;
cout << "daylight savings = " <<(timePtr->tm_isdst )<< endl;
cout << endl;
cout << endl;
cout << "Date " <<(timePtr->tm_mday)<<"/"<< (timePtr->tm_mon)+1 <<"/"<< (timePtr->tm_year)+1900<< endl;
cout << "Time " << (timePtr->tm_hour)<<":"<< (timePtr->tm_min)<<":"<< (timePtr->tm_sec) << endl;
return 0;
}
Explanation: